[Lldb-commits] [PATCH] D157041: [lldb] Protect OptionValue accesses from data races
Augusto Noronha via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Aug 3 16:21:15 PDT 2023
augusto2112 added a comment.
> Do all of these need to be protected with a mutex? In your description you're saying TSan is detecting data races. What piece of data are you observing the data race on?
Only SetAsBoolean/GetAsBoolean are being caught when running our test suite at the moment.
> Do we need a recursive mutex? I assume that these operations might call into each other, but if not it would be nice to just have it be a std::mutex.
If we want to protect all accesses then yes, since these functions call each other. It we decide to only lock against what's being caught by tsan then we can get by with a regular mutex.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D157041/new/
https://reviews.llvm.org/D157041
More information about the lldb-commits
mailing list