Skip to content

Commit 531df99

Browse files
authored
Merge pull request #61991 from etcwilde/ewilde/note-to-self
Add note to stop trying to fix compat tsan syms
2 parents deb2fbd + 801e090 commit 531df99

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

stdlib/toolchain/Compatibility56/Concurrency/ThreadSanitizer.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,12 @@ namespace {
2323
using TSanFunc = void(void *);
2424
} // anonymous namespace
2525

26+
// Note: We can't use a proper interface to get the `__tsan_acquire` and
27+
// `__tsan_release` from the public/Concurrency/ThreadSanitizer.cpp.
28+
// Unfortunately, we can't do this because there is no interface in the runtimes
29+
// we are backdeploying to. So we're stuck using this lazy dlsym game.
30+
// Number of times I've tried to fix this: 3
31+
2632
void swift::_swift_tsan_acquire(void *addr) {
2733
const auto backdeploy_tsan_acquire =
2834
reinterpret_cast<TSanFunc *>(SWIFT_LAZY_CONSTANT(dlsym(RTLD_DEFAULT, "__tsan_acquire")));

0 commit comments

Comments
 (0)