[compiler-rt] r319163 - Correct mangled_sp on NetBSD/amd64 in TSan
Kamil Rytarowski via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 28 03:21:27 PST 2017
Author: kamil
Date: Tue Nov 28 03:21:27 2017
New Revision: 319163
URL: http://llvm.org/viewvc/llvm-project?rev=319163&view=rev
Log:
Correct mangled_sp on NetBSD/amd64 in TSan
The proper index is 6, not 2.
Patch extracted from https://reviews.llvm.org/D40337
Reviewed and accepted by <dvyukov>.
Sponsored by <The NetBSD Foundation>
Modified:
compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc?rev=319163&r1=319162&r2=319163&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc Tue Nov 28 03:21:27 2017
@@ -502,15 +502,17 @@ static void SetJmp(ThreadState *thr, upt
static void LongJmp(ThreadState *thr, uptr *env) {
#ifdef __powerpc__
uptr mangled_sp = env[0];
-#elif SANITIZER_FREEBSD || SANITIZER_NETBSD
+#elif SANITIZER_FREEBSD
uptr mangled_sp = env[2];
+#elif SANITIZER_NETBSD
+ uptr mangled_sp = env[6];
#elif SANITIZER_MAC
# ifdef __aarch64__
uptr mangled_sp = env[13];
# else
uptr mangled_sp = env[2];
# endif
-#elif defined(SANITIZER_LINUX)
+#elif SANITIZER_LINUX
# ifdef __aarch64__
uptr mangled_sp = env[13];
# elif defined(__mips64)
More information about the llvm-commits
mailing list