[Interest] Will TSAN_OPTIONS=detect_deadlocks=1 work when Qt is compiled with -sanitize thread?

Dennis Luehring dl.soluz at gmx.net
Thu Jul 18 17:15:05 CEST 2024


Am 18.07.2024 um 17:07 schrieb Nuno Santos via Interest:
> https://github.com/google/sanitizers/wiki/ThreadSanitizerDeadlockDetector
>
> "Just use TSAN_OPTIONS=detect_deadlocks=1 when running your tsan-instrumented program.”
>

this document is from 2015 - lock order inversion aka Deadlock detection
is a feature that is active per default
or better said i've used TSAN many times to find deadlocks - maybe its a
special feature but seems to be the default now

beware: you should always use recent gcc or clang for TSAN/ASAN as they
evolve permanently - older compiler instrumentation just don't be that good
in detecting - im normaly using SUSE Tumbleweed with latest available
gcc/clang for a my "bug hunting" environment

do you try to find a Deadlock inside Qt code or inside your application
- for the first a TSAN build of Qt would be better to prevent false
positives





More information about the Interest mailing list