-
Notifications
You must be signed in to change notification settings - Fork 786
--spill-pointers fails on program #4721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Perhaps the stack size is not big enough? If that doesn't fix it, can try to run with sanitizers who might find something. And reducing it to something minimal would be useful. |
Thanks, I'll have a go. Is there a guide to running sanitisers with wasm? Is this the clang ones, do iiust pass them on the command line when compiling? |
I reduced to two different small programs but (unfortunately) while they are small C++ programs, they are still calling into significant parts of the standard library:
And
|
With emscripten you can use sanitizers normally, just pass the flags at compile and link time, https://emscripten.org/docs/debugging/Sanitizers.html |
This isn't a fix, but I have just discovered that |
#6294 might fix this |
Closing since this is likely to have been fixed. If that's not right, please reopen or file a new issue with new details. |
Uh oh!
There was an error while loading. Please reload this page.
Below is a simple(ish) sudoku solver.
emcc a.cpp -o a.html
produces a working program. If I then addwasm-opt a.wasm --spill-pointers -o a.wasm
I getUncaught RuntimeError: indirect call to null
.I started trying to reduce the program, but found many changes would fix the program, as (I think) the compiler is clever enough to optimise away the need for spilling pointers.
I could try to reduce the example further if that would be useful -- hopefully someone who knows more about
wasm-opt
might be able to figure out what's going on? --spill-pointers was re-added recently in #4570I'm finding --spill-pointers fails on most large programs, this was one I found that was (I hope) small enough to be easily looked at, but big enough to fail.
The text was updated successfully, but these errors were encountered: