[llvm-branch-commits] [NFC][TSan] Move ObtainCurrentStack out of ThreadRegistryLock scope (PR #228794)
Vitaly Buka via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sat Oct 3 17:47:45 PDT 2026
https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/228794
ObtainCurrentStack only reads the current thread's shadow stack and
allocates a VarSizeStackTrace buffer, which does not require
ThreadRegistryLock (and already runs outside ThreadRegistryLock in
ReportRace, SignalUnsafeCall, and ReportErrnoSpoiling).
Move ObtainCurrentStack (and dummy_pc in ReportDeadlock) before
ScopedReport in ReportMutexHeldWrongContext, ReportMutexMisuse,
ReportDeadlock, and ReportDestroyLocked so the stack trace buffers also
outlive ScopedReport and OutputReport.
Assisted-by: Gemini
More information about the llvm-branch-commits
mailing list