Module Name: src
Committed By: martin
Date: Wed Apr 19 16:24:51 UTC 2023
Modified Files:
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common [netbsd-10]:
sanitizer_mutex.h
Log Message:
Pull up following revision(s) (requested by hannken in ticket #140):
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h:
revision 1.3
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
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.6.1 \
src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h
diff -u src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h:1.2 src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h:1.2.6.1
--- src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h:1.2 Sun Apr 11 23:54:27 2021
+++ src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h Wed Apr 19 16:24:51 2023
@@ -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: