Skip to content

[EH] Add comment on __cxa_init_primary_exception in cxa_noexception.cpp #22034

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

Merged
merged 1 commit into from
May 31, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions system/lib/libcxxabi/src/cxa_noexception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,12 @@ void __cxa_free_exception(void *thrown_object) throw() {
free((void *)raw_buffer);
}

// This function is called from make_exception_ptr in libcxx unless
// -fno-exceptions is not given. We have definitions of this function in
// cxa_exception.cpp and cxa_exception_emscripten.cpp, but unlike other
// platforms, we use those files only when one of Emscripten EH or Wasm EH is
// used, and we use this cxa_noexceptions.cpp in case of -fignore-exceptions,
// which is our default. So we add a definition here to prevent a link failure.
__cxa_exception*
__cxa_init_primary_exception(void* object,
std::type_info* tinfo,
Expand Down
Loading