Do you have a testcase showing the issue? Might be a bug where we remove a ctor but still try to run it, but I have no guess as to how that could happen.
(enabling wasm is expected to avoid such a bug, since wasm doesn't use the ctor evaller - we need to build a new one for wasm, reusing the JS one isn't good enough) On Thu, Jan 19, 2017 at 6:05 AM, Gaurav Dewan <[email protected]> wrote: > During initialization time in asm.js build, it tries to call global > initializer of file (which should have been stripped by dead code removal, > I guess) > > With "-s EVAL_CTORS=1 -s DISABLE_EXCEPTION_CATCHING=1", no error is issued > at build time; but generated asm file fails to run with error: > Uncaught TypeError: __GLOBAL__sub_I_regex_cpp is not a function > at func > at callRuntimeCallbacks > at ensureInitRuntime > at doRun (acrobat.js:18) > at run > at runCaller > at removeRunDependency > at applyMemoryInitializer > at XMLHttpRequest.xhr_onload > Interestingly, generated WASM build (same compiler/same options except -s > WASM=1) does not fail. > > EVAL_CTORS is enabled by -Oz option automatically. > > With "-s EVAL_CTORS=1 -s DISABLE_EXCEPTION_CATCHING=0", generated asm file > appears to work correctly. > With "-s EVAL_CTORS=0 -s DISABLE_EXCEPTION_CATCHING=1", generated asm file > appears to work correctly. > > -- > 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.
