[all-commits] [llvm/llvm-project] 01bf29: [sanitizers] Optimize locking StackDepotBase for f...
Vitaly Buka via All-commits
all-commits at lists.llvm.org
Tue Dec 26 11:21:19 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 01bf29b9d04e047096b34acc7e4ad1aff97f1a43
https://github.com/llvm/llvm-project/commit/01bf29b9d04e047096b34acc7e4ad1aff97f1a43
Author: Vitaly Buka <vitalybuka at google.com>
Date: 2023-12-26 (Tue, 26 Dec 2023)
Changed paths:
M compiler-rt/lib/sanitizer_common/sanitizer_flat_map.h
M compiler-rt/lib/sanitizer_common/sanitizer_stackdepotbase.h
Log Message:
-----------
[sanitizers] Optimize locking StackDepotBase for fork (#76280)
Locking StackDepotBase fully is very expensive, as 2^20 buckets needs to
be locked. Not locking, but only unlocking buckets, needed to be
unlocked to avoid deadlocks, increases a chance of data race, when the
value with same hash can be inserted into table twice, but one is lost.
However this is just a small additional memory usage by forked process.
More information about the All-commits
mailing list