[PATCH] D123158: make a debug check thread-safe

Luboš Luňák via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 7 12:54:10 PDT 2022


llunak added a comment.

In D123158#3432365 <https://reviews.llvm.org/D123158#3432365>, @urnathan wrote:

> ETA:but it doesn't matter whether this check runs multiple times, in racing threads?  I guess one wants an atomic set though.

AFAICT the problem is only that it causes warnings from thread-sanitizer, there is no actual problem as such. I don't know if an atomic set would help (@JDevlieghere can you try please?). But even if, I presume it's not available in libcxxabi either if once isn't?

> The once-only bits you've added are probably not available in libcxxabi?

I have no idea about libcxxabi. I'm relatively unfamiliar with LLVM, I've just created this PR because the warning got mentioned as triggered by code in my other PR and I thought this would be a simple fix. If it isn't, then I probably don't know how to do better here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123158



More information about the llvm-commits mailing list