AnyPS5/core/libs/prx/libc/src/exception
AlxcBTW 649782b7b6 fix(libc): export the remaining exception entry points natively on Windows
On Windows libc exports __cxa_init_primary_exception, std::uncaught_exception
and std::uncaught_exceptions only as _nid_postfix symbols (GCC_GLOBAL_ALIAS
is empty there), so host modules bind libstdc++-6.dll's versions:

- std::make_exception_ptr, which std::promise's destructor uses for
  broken_promise, allocated the exception with libc and initialized it with
  libstdc++'s __cxa_init_primary_exception, whose header layout differs.
  A test that makes one and rethrows it dies with an access violation.
- std::uncaught_exceptions read libstdc++'s thread state, which libc's
  throws never touch, so it returned 0 while an exception unwound. The
  AGC driver's deferred-label guard relies on it to tell a failed record
  from a finished one.

The three are now exported natively, like __cxa_throw and the rest.
__cxa_init_primary_exception also sets the reference count to 0, as the
Itanium ABI does: the exception_ptr created next takes the only
reference, so a made exception is destroyed once instead of leaking.
2026-10-10 21:20:29 +13:00
..
ArraySupport.cpp feat(libs): define vabi macros + add to declarations 2026-09-10 08:07:03 +03:00
ExceptionPointer.cpp fix(libc): release future results' exceptions through libc on Windows 2026-10-10 19:29:19 +13:00
Exports.cpp fix(libc): export the remaining exception entry points natively on Windows 2026-10-10 21:20:29 +13:00
GuardSupport.cpp feat(libs): define vabi macros + add to declarations 2026-09-10 08:07:03 +03:00
Personality.cpp feat(libc): exception runtime on macOS hosts 2026-10-08 13:16:41 +03:00
Runtime.cpp fix(libc): export the remaining exception entry points natively on Windows 2026-10-10 21:20:29 +13:00
StandardExceptions.cpp fix(libc): bridge guest exception vtable callbacks 2026-10-08 23:06:47 +02:00
TypeInfo.cpp feat(libs): add new std symbols + unused filter off by default 2026-09-24 10:28:33 +03:00
Unwind.cpp feat(libc): exception runtime on macOS hosts 2026-10-08 13:16:41 +03:00