projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9601085
)
[lsan] Replace atomic_store/atomic_load with atomic_fetch_add
author
Vitaly Buka
<vitalybuka@google.com>
Wed, 8 Dec 2021 06:39:12 +0000
(22:39 -0800)
committer
Vitaly Buka
<vitalybuka@google.com>
Wed, 8 Dec 2021 06:39:12 +0000
(22:39 -0800)
compiler-rt/lib/lsan/lsan_common.cpp
patch
|
blob
|
history
diff --git
a/compiler-rt/lib/lsan/lsan_common.cpp
b/compiler-rt/lib/lsan/lsan_common.cpp
index
5319d00
..
510b4a3
100644
(file)
--- a/
compiler-rt/lib/lsan/lsan_common.cpp
+++ b/
compiler-rt/lib/lsan/lsan_common.cpp
@@
-913,8
+913,8
@@
uptr LeakReport::ApplySuppressions() {
leaks_[i].stack_trace_id, StackDepotGet(leaks_[i].stack_trace_id));
if (s) {
s->weight += leaks_[i].total_size;
- atomic_
store_relaxed(&s->hit_count, atomic_load_relaxed(&s->hit_count) +
-
leaks_[i].hit_count
);
+ atomic_
fetch_add(&s->hit_count, leaks_[i].hit_count,
+
memory_order_relaxed
);
leaks_[i].is_suppressed = true;
++new_suppressions;
}