[PATCH] D90719: [DebugInfo] Modify ctor homing as workaround for unconstructed libcxx types

Reid Kleckner via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 3 15:58:20 PST 2020


rnk added a subscriber: EricWF.
rnk added a comment.

In D90719#2372463 <https://reviews.llvm.org/D90719#2372463>, @dblaikie wrote:

> Does Chromium need this fixed in clang? Or if it were fixed in libc++ would that be adequate? (does Chromium's build need to work with old libc++s, or does it always build with a libc++ that matches the compiler? (in the latter case, a fix in libc++ would be as good as a fix in clang))

Well, we'd like to make this new type homing behavior the default, and it wouldn't work with old libc++ versions, and there is the general possibility that there is code out there like this libc++ code that has implicit nontrivial constructors that are not used. So, I wouldn't think so much about what's right for Chrome, and more about what's right for Clang.

If we do want to fix libc++, I'd warn you that the code is subtle. It takes care to construct the node value in a particular way, and it sets a flag after construction succeeds, which perhaps affects exception safety:
https://github.com/llvm/llvm-project/blob/master/libcxx/include/__hash_table#L2456
+ @EricWF


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D90719/new/

https://reviews.llvm.org/D90719



More information about the cfe-commits mailing list