-
Notifications
You must be signed in to change notification settings - Fork 654
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
exception handler intercepts c++ exceptions in the host on windows #3416
Comments
So how about LOG_ERROR for the actual wasm exception and LOG_WARNING/LOG_VERBOSE to replace the log you are pointing out? And maybe add extra info like "unrecognized exception for wasm, pass to user's host exception handler" to explain the intention of return EXCEPTION_CONTINUE_SEARCH is to search for the next handler(transfer to the user's own handler). What do you think? |
Hi, I have looked into the code in more detail now. I would prefer to log a warning when inside wasm, and unknown exception code only. There is no point in logging anything if the exception is not related to the wasm, as such cases should be handled in other handlers. And no logging is necessary when the exception code is handled with wasm_set_exception.
Furthermore, It would be nice to have similar logging on linux, which currently does not log anything. However, I dont know if it is allowed to do so inside signal handler? |
I think the current method in Linux is fine. If you look at the code logic here: https://github.com/bytecodealliance/wasm-micro-runtime/blob/main/core/shared/platform/common/posix/posix_thread.c#L610-L643 |
awesome. thanks ;) |
embedding wamr into c++ application, after initializing, the wamr spams into console with every c++ exception thrown (in the host), even if completely unrelated to wasm.
the logging happens on
wasm-micro-runtime/core/iwasm/common/wasm_runtime_common.c
Line 386 in c85bada
my understanding is that this handler is used for HW bounds checks, in which case it should ignore all other types of exceptions, and only log when actual issue has happened.
The text was updated successfully, but these errors were encountered: