We currently memorize u64 id + epoch for each mutex.
The new tsan runtime will memorize address + stack_id instead.
But switching to address + stack_id requires new trace,
which in turn requires new MutexSet and some other changes.
Extend MutexSet to support both new and old info to break
the dependency cycles. The plan is to remove the old
info/methods after switching to the new runtime.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
compiler-rt/lib/tsan/rtl/tsan_mutexset.cpp | ||
---|---|---|
86–93 | hm, it does for clang, but not gcc |
compiler-rt/lib/tsan/rtl/tsan_mutexset.cpp | ||
---|---|---|
20 | memset(this) is somewhat ugly hack (technically UB and can break if we add virtual functions): The current memset avoids a very specific problem with compiler-emitted memset. It's not that we generally want these C hacks to save few lines. So I would prefer to initialize normal variables as one would do it normally. |
compiler-rt/lib/tsan/rtl/tsan_mutexset.cpp | ||
---|---|---|
20 | These could actually be initialized inline at definition. |
memset(this...)?