-
Notifications
You must be signed in to change notification settings - Fork 3.4k
[wasm-exceptions] Probable memory corruption when doing try...catch...rethrow #22861
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
Can you point to what that commit was?
So does this error with Anyway some kind of reproducer would be really helpful. If it's hard to provide source code, can you provide binary that errors out when run, with how to run the binary? |
On
I assume some memory corruption/undefined behaviour is going inside.
Unfortunately, I also can't provide the binary and the steps to use it, due to company policy. I had created the earlier reproducer but somehow it is not replicating the issue on |
Sounds like a similar issue as llvm/llvm-project#114600, which was fixed via commit |
I tried installing above commit using |
Thanks for checking.
For reference, here's the associated revision changeset for this roll: The only WebAssembly-related change within this set is llvm/llvm-project@dbca8aa. |
@aheejin @sbc100 This is totally breaking our app on Safari 18. Once this error (memory access out of bound) comes, other calls are also giving some weird memory corruption errors. So, nothing works after that moment. As mentioned by @kleisauke , llvm/llvm-project#114600 looks very similar and recent. Can their be a possibility that still there exist some cases to be fixed in the |
This removes nondeterminism and is not about memory corruption. |
Sorry but given that we don't have a reproducer I don't have any guess on what this could be. If your company policy prohibits sharing the binary in the open forum, can you possibly share it privately? Github provides a way to collaborate on a private repo, or you can share it in a Google drive. And what makes you think this is related to |
We were using emsdk
3.1.35
when we encountered a weird memory access out of bound error on latest Safari (Safari 18). The same error wasn't reproducible on chrome. Initially we thought there could be an error in latest Safari. The code in our codebase at which we were getting the error was like below:We tried building above sample code (with emsdk 3.1.35) with address sanitizer using command:
With address sanitizer builld, this code started giving below error on all browsers (including Chrome):
We definitely knew there was something wrong in the 3.1.35 emsdk version. We upgraded the emsdk version to 3.1.56 and this error with the address sanitizer in the sample code was gone. Upon bisecting we could find that there was some LLVM update that fixed it.
But when we used the same emscripten version with our actual codebase we were still getting the same error on Safari 18. As of now, we also tried with emscripten
tot
but the error in our codebase persists. We tried building our codebase with address sanitizer so that it may get reproduced on other browsers as well but no luck. Don't know if something has changed in the address sanitizer in newer emsdk versions which has caused it to not give the same error or any actual fix has been done.Additionally, if we build our codebase with js exceptions (
-sDISABLE_EXCEPTION_CATCHING=0
) we do not get any memory access out of bound (memory corruption) issue. This shows that, there is definitely something wrong with wasm-exceptions implementation and above describedtry...catch...rethrow
flow.Its unfortunate that we do not have a sample code that is reproducing the issue on latest emscripten. But we have some information that can help investigation get started.
The text was updated successfully, but these errors were encountered: