[llvm-branch-commits] [compiler-rt] [sanitizers] Optimize locking StackDepotBase for fork (PR #76280)

Vitaly Buka via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Dec 22 23:26:21 PST 2023


https://github.com/vitalybuka created https://github.com/llvm/llvm-project/pull/76280

Locking StackDepotBase fully is very expensive, as 2^20 buckets needs to
be locked. Not locking, and unclocking only buckets, needed to be
unlocked to avoid deadlocks, increases a chance of data race, when same
item can be inserted into table twice. However this is just a small
additional memory usage by forked process.





More information about the llvm-branch-commits mailing list