I've built now with -g and SAFE_HEAP=3, it makes no difference. I guess I
should file a bug?
On Dec 9, 2014 1:08 AM, "Alon Zakai" <[email protected]> wrote:

> Possibly, but see tips in
>
> http://kripken.github.io/emscripten-site/docs/porting/Debugging.html
>
> , building with SAFE_HEAP and ASSERTIONS etc. can find undefined behavior.
> It is possible it only shows up in optimized builds (optimizer can take
> advantage of undefined behavior).
>
> - Alon
>
>
> On Sun, Dec 7, 2014 at 12:31 PM, Arve Knudsen <[email protected]>
> wrote:
>
>> Hi
>>
>> When including optimized (-O3) ChucK (https://github.com/aknuds1/chuck)
>> code in my app, it invariably breaks when loaded, with the following error
>> message:
>>
>>      Invalid function pointer '0' called with signature 'ii'. Perhaps
>> this is an invalid value (e.g. caused by calling a virtual method on a NULL
>> pointer)? Or calling a function with an incorrect type, which will fail?
>> (it is worth building your source files with -Werror (warnings are errors),
>> as warnings can indicate undefined behavior which can cause this)
>>
>> The code doesn't break if I compile without optimization. I'm using
>> Emscripten 1.27.0. I've tested with both Chrome and Firefox on OS X. You
>> can try for yourselves at http://104.131.177.17/ (just check the console
>> after loading the page).
>>
>> Is this due to a bug in Emscripten?
>>
>> Arve
>>
>> --
>> 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 [email protected].
>> 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 [email protected].
> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to