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
Unhandled runtime exception: wavm.reachedUnreachable (sigabrt) #110
Comments
|
This is the expected behavior: calling the missing import triggers a WebAssembly runtime exception (as if executing the That said, this error message shouldn't include a second callstack, and I think calling it an unhandled exception when WAVM always handles runtime exceptions by aborting is misleading. I've addressed those issues in 55c3873 and 3d74c4d. Thanks! |
|
I agree with you that it should be impossible to escape the sandbox. But I'd prefer to output an detailed error message and exit with a non-zero status. (module
(type $0(func))
(type(func(param)))
(type $2(func(param)(result)))
(type $5(func(param i32 i32 i32)))
(memory 0)
(export "main"(func $main))
(func(type $5)(param i32)(param i32)(param $0 i32))
(func $main(param i32)(param i32)(result i32)(i32.const 0))
)And it may report: |
The second call stack is just the first call stack, where the runtime exception was triggered, plus the functions that handle the runtime exception and call abort that will always be the same. Removing it doesn't remove any information, and makes it clearer where the actual problem is. Is there a reason to call
That's actually a bug; I fixed it in 31d670b. Thanks! |
|
I admit it's only about user-friendliness. I actually would like wavm to dump the error message as detailed as possible. In the two cases mentioned above, they both crash with signals however the error messages don't distinguish them with enough information for users. |
When executing
wasm $FILE, the vm may trigger aUnhandled runtime exceptionas of 234e8b9.POCs:
https://github.com/ntu-sec/pocs/blob/master/wavm-234e8b9/crashes/sigabrt_Invoke.cpp:50_1.wast
https://github.com/ntu-sec/pocs/blob/master/wavm-234e8b9/crashes/sigabrt_Invoke.cpp:50_2.wasm
gdb output is like:
The text was updated successfully, but these errors were encountered: