[libcxx-commits] [PATCH] D138527: [libc++abi] Simplify __cxa_get_globals_fast callsites
Shoaib Meenai via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Nov 22 14:52:36 PST 2022
smeenai added inline comments.
================
Comment at: libcxxabi/test/test_exception_storage.pass.cpp:21
void* fast_globals = __cxxabiv1::__cxa_get_globals_fast();
+ if (!fast_globals)
+ std::fprintf(stderr, "Got null result from __cxa_get_globals_fast\n");
----------------
MaskRay wrote:
> The adjustment should be merged into D138460
D138460 was originally stacked under D138461, and D138461 is what guaranteed that `__cxa_get_globals_fast` would be non-null even if you called it on a thread before `__cxa_get_globals`, so it wasn't correct to make the change then. It could be folded into D138460 now (since D138461 landed before it), but I felt it made more sense to keep it here. This change is the follow-up to D138461 that tweaks the rest of the code to rely on `__cxa_get_globals_fast` never returning non-null, and so I wanted the test for that specific functionality to also live here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138527/new/
https://reviews.llvm.org/D138527
More information about the libcxx-commits
mailing list