[PATCH] D123158: make a debug check thread-safe
Nathan Sidwell via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 8 04:02:27 PDT 2022
urnathan added a comment.
In D123158#3437191 <https://reviews.llvm.org/D123158#3437191>, @llunak wrote:
> 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?
ah, that explains it. I didn't want to expose the array outside of the lookup function, but that would be another solution. Then a unit test can test it.
>> 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.
understood. Mind if I grab the PR? (Is there an actual PR to grab?)
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