forked from emscripten-core/emscripten
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EH] Make lsan/asan work with Wasm EH (emscripten-core#23552)
`std::rethrow_exception` leaked memory because dependent exceptions were not recognized as such and thus not freed properly here: https://github.com/emscripten-core/emscripten/blob/44fd294e8244afa710cecb2c10c9a644a6549b8e/system/lib/libcxxabi/src/cxa_exception.cpp#L575-L583 The reason for that was, in `__cxa_rethrow_primary_exception`, we were incorrectly throwing the primary exception, not the dependent one. I think the error was introduced during copy-pasting. `isDependentException` method was copied from `cxa_exception.cpp`, because it is a static function, as in the case for other utility functions in that file. This also adds handling for dependent exceptions in `__get_exception_message`. Fixes emscripten-core#21124.
- Loading branch information
Showing
4 changed files
with
17 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters