Is the integer overflow when running the code? Could be a trap mode issue,
see https://emscripten.org/docs/compiling/WebAssembly.html#trap-mode
Building with clamp as described there may help.

On Sat, Mar 30, 2019 at 4:45 PM Ian Bell <[email protected]> wrote:

> I have a library in C++ that I compiled into a JS module with
> emscripten+WASM.  When I do a CMake build with the Release flags (-02, most
> importantly), I am unable to load the WASM code (I get an integer overflow
> error).  I stripped down my HTML to only calling the library, so I am sure
> it is not caused by overwriting any of the global variables caused by the
> closure.
>
> But surprisingly, when I build with a RelWithDebInfo build in CMake (-O2
> -g, most importantly), the WASM loads fine again.  I wonder what is going
> on.  What information could I provide to help debugging of this emscripten
> bug?  Once I know that, I'll file an issue.
>
> Best,
> Ian
>
> --
> 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