Skip to content
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

Does not support C++exceptions, and does not support emcc exceptions? Are there any other solutions #2345

Open
w4454962 opened this issue Jul 5, 2023 · 3 comments

Comments

@w4454962
Copy link

w4454962 commented Jul 5, 2023

There are abnormal requirements now, but none seem to have been implemented, even the "dev/exc_handling" branch has not fully seen the implementation of import functions when there are C++exceptions running.

@woodsmc
Copy link

woodsmc commented Jul 6, 2023

The dev/exc_handling branch is expected to have support for WASM exceptions, as per this issue. It's taken longer than excepted to get the implementation completed.

edit: fix link

@w4454962
Copy link
Author

w4454962 commented Jul 8, 2023

The temporary solution now is to encapsulate a security callback function, similar to "lua_pcall" and "lua_xpcall" in lua, to avoid code termination and exit.

But it can only be applied in its own code, and it is impossible to patch Standard library or third-party libraries that use C++exceptions

@woodsmc
Copy link

woodsmc commented Jul 13, 2023

We hope to have an initial implementation of WASI exception handling coming to WAMR in the next few weeks.

There is still an open question about tool chain support. At the moment the Emscripten compiler tool chain supports WASI Exceptions for C++. The WASI SDK doesn't at the moment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants