[libcxx-commits] [PATCH] D138527: [libc++abi] Simplify __cxa_get_globals_fast callsites
Fangrui Song via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Nov 22 15:09:58 PST 2022
MaskRay accepted this revision.
MaskRay added a comment.
I checked every calls site of `__cxa_get_globals_fast` and confirm that this is comprehenstive.
================
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");
----------------
smeenai wrote:
> 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.
Ah, right. Thanks for the description.
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