Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-10]: src/external/gpl3/gcc/dist/libsanitizer/sanitizer_common Pul...
details: https://anonhg.NetBSD.org/src/rev/f8dfab319add
branches: netbsd-10
changeset: 374336:f8dfab319add
user: martin <martin%NetBSD.org@localhost>
date: Wed Apr 19 16:24:51 2023 +0000
description:
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
diffstat:
external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diffs (12 lines):
diff -r b12312984916 -r f8dfab319add external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h
--- a/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h Mon Apr 17 18:34:56 2023 +0000
+++ b/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_mutex.h Wed Apr 19 16:24:51 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