[PATCH] D135919: [Clang] Set thread_local Itanium ABI guard variables before calling constructors.
John McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 14 09:40:09 PDT 2022
rjmccall added a comment.
Sorry, I responded as if you were modifying the guards of static constructors, but you're actually modifying the guards of thread locals. I apologize for the confusion. However, my substantive points actually all still hold:
- we have to generate code that behaves correctly in the presence of exceptions
- providing access to an uninitialized variable is worse than recursively re-entering initialization; in either case, the program is incorrect, and the latter is much more likely to cause an immediate failure at runtime
- the real fix requires a more elaborate code sequence
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D135919/new/
https://reviews.llvm.org/D135919
More information about the cfe-commits
mailing list