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

MSYS2: Enable unexpected exception handling on clang64 #286

Merged
merged 1 commit into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ jobs:
- msystem: clang64
package-prefix: clang-x86_64
cmake-flags: LDFLAGS="-lc++"
ctest-flags: -E UnexpectedException*
# Don't abort runners if a single one fails
fail-fast: false
runs-on: ${{ matrix.os }}
Expand Down
7 changes: 0 additions & 7 deletions objcxx_eh_mingw.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ extern "C"
OBJC_PUBLIC
void objc_exception_throw(id object)
{
#ifdef __GLIBCXX__
// Don't bother with a mutex here. It doesn't matter if two threads set
// these values at the same time.
if (!done_setup)
Expand All @@ -63,17 +62,12 @@ void objc_exception_throw(id object)

done_setup = true;
}
#endif

id *exc = (id *)__cxa_allocate_exception(sizeof(id));
*exc = object;
objc_retain(object);
DEBUG_LOG("objc_exception_throw: Throwing 0x%x\n", *exc);

#ifndef __GLIBCXX__
// At the moment, only libstdc++ exposes __cxa_init_primary_exception.
__cxa_throw(exc, & __objc_id_type_info, eh_cleanup);
#else
__cxa_eh_globals *globals = __cxa_get_globals ();
globals->uncaughtExceptions += 1;
__cxa_refcounted_exception *header =
Expand All @@ -90,7 +84,6 @@ void objc_exception_throw(id object)
}
DEBUG_LOG("Throw returned %d\n",(int) err);
abort();
#endif
}

OBJC_PUBLIC extern objc_uncaught_exception_handler objc_setUncaughtExceptionHandler(objc_uncaught_exception_handler handler)
Expand Down