Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common Fix...
details: https://anonhg.NetBSD.org/src/rev/007cc750236b
branches: trunk
changeset: 374161:007cc750236b
user: hannken <hannken%NetBSD.org@localhost>
date: Wed Apr 05 07:41:38 2023 +0000
description:
Fix StaticSpinMutex::CheckLocked() on sparc32.
The lock gets set with atomic_exchange() -> __sync_lock_test_and_set()
which sets the value to 255 instead of 1. Check for a taken lock
with "!= 0" instead of "== 1". This should work on all architectures.
Ok: Matthew Green
diffstat:
external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r b19b74276cf3 -r 007cc750236b external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h
--- a/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h Tue Apr 04 20:39:36 2023 +0000
+++ b/external/gpl3/gcc.old/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h Wed Apr 05 07:41:38 2023 +0000
@@ -39,7 +39,7 @@ class StaticSpinMutex {
}
void CheckLocked() {
- CHECK_EQ(atomic_load(&state_, memory_order_relaxed), 1);
+ CHECK_NE(atomic_load(&state_, memory_order_relaxed), 0);
}
private:
Home |
Main Index |
Thread Index |
Old Index