Re: Emterpreter and fpcast

2018-12-10 Thread Beuc
Thanks for the feedback!

I was worried fpcast would somehow switch to non-emterpreter execution
and cause issues on stop/resume.

Beuc

On 09/12/2018 17:22, Alon Zakai wrote:
> I believe that's normal, yes. For function pointer cast emulation we
> run binaryens fpcast-emu pass. It turns each indirect call into a call
> like that, so you will see them on the stack. This happens after
> emterpretify, and there should be no interactions between them that I
> can think of atm.
>
> On Sun, Dec 9, 2018 at 6:03 AM Beuc  > wrote:
>
> Hi,
>
> My current Python+Emterpreter app (https://renpy.beuc.net/) sometimes
> crashes unexpectedly, e.g. when going back to the browser tab after a
> few minutes of inactivity.
>
> I'm still trying to figure out where that comes from, but something in
> the JS stack trace intrigues me:
>
> ...
> emterpret
> emterpret
> _function_call
> byn$fpcast-emu$_function_call
> emterpret
> emterpret
> ...
>
> while I do specify:
> -s EMTERPRETIFY_WHITELIST='["_main", ... "_function_call"...
>
> (adding "byn$fpcast-emu$_function_call" doesn't change the behavior)
>
> The application generally works correctly when calling
> emscripten_sleep(), so it doesn't look like this is the culprit, but
> I'd rather make sure.
>
> Is it normal that fpcast'd functions appear that way in the
> emterpreter stack?
>
> Cheers!
> Sylvain
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to emscripten-discuss+unsubscr...@googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>
> -- 
> You received this message because you are subscribed to the Google
> Groups "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to emscripten-discuss+unsubscr...@googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Emterpreter and fpcast

2018-12-09 Thread Alon Zakai
I believe that's normal, yes. For function pointer cast emulation we run
binaryens fpcast-emu pass. It turns each indirect call into a call like
that, so you will see them on the stack. This happens after emterpretify,
and there should be no interactions between them that I can think of atm.

On Sun, Dec 9, 2018 at 6:03 AM Beuc  wrote:

> Hi,
>
> My current Python+Emterpreter app (https://renpy.beuc.net/) sometimes
> crashes unexpectedly, e.g. when going back to the browser tab after a
> few minutes of inactivity.
>
> I'm still trying to figure out where that comes from, but something in
> the JS stack trace intrigues me:
>
> ...
> emterpret
> emterpret
> _function_call
> byn$fpcast-emu$_function_call
> emterpret
> emterpret
> ...
>
> while I do specify:
> -s EMTERPRETIFY_WHITELIST='["_main", ... "_function_call"...
>
> (adding "byn$fpcast-emu$_function_call" doesn't change the behavior)
>
> The application generally works correctly when calling
> emscripten_sleep(), so it doesn't look like this is the culprit, but
> I'd rather make sure.
>
> Is it normal that fpcast'd functions appear that way in the emterpreter
> stack?
>
> Cheers!
> Sylvain
>
> --
> You received this message because you are subscribed to the Google Groups
> "emscripten-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to emscripten-discuss+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Emterpreter and fpcast

2018-12-09 Thread Beuc
Hi,

My current Python+Emterpreter app (https://renpy.beuc.net/) sometimes
crashes unexpectedly, e.g. when going back to the browser tab after a
few minutes of inactivity.

I'm still trying to figure out where that comes from, but something in
the JS stack trace intrigues me:

...
emterpret
emterpret
_function_call
byn$fpcast-emu$_function_call
emterpret
emterpret
...

while I do specify:
-s EMTERPRETIFY_WHITELIST='["_main", ... "_function_call"...

(adding "byn$fpcast-emu$_function_call" doesn't change the behavior)

The application generally works correctly when calling
emscripten_sleep(), so it doesn't look like this is the culprit, but
I'd rather make sure.

Is it normal that fpcast'd functions appear that way in the emterpreter stack?

Cheers!
Sylvain

-- 
You received this message because you are subscribed to the Google Groups 
"emscripten-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to emscripten-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.