[compiler-rt] r338208 - Fix Asan-i386-calls-Test AddressSanitizer.ShadowGapTest on FreeBSD

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 28 16:41:50 PDT 2018


Author: maskray
Date: Sat Jul 28 16:41:50 2018
New Revision: 338208

URL: http://llvm.org/viewvc/llvm-project?rev=338208&view=rev
Log:
Fix Asan-i386-calls-Test AddressSanitizer.ShadowGapTest on FreeBSD

0x22000000 happens to be on the left of a heap allocation and the error
message is different (heap-buffer-overflow).
FreeBSD NetBSD have larger SHADOW_OFFSET (0x40000000) but let's try not
using #ifdef here.

Modified:
    compiler-rt/trunk/lib/asan/tests/asan_test.cc

Modified: compiler-rt/trunk/lib/asan/tests/asan_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/tests/asan_test.cc?rev=338208&r1=338207&r2=338208&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/tests/asan_test.cc (original)
+++ compiler-rt/trunk/lib/asan/tests/asan_test.cc Sat Jul 28 16:41:50 2018
@@ -963,7 +963,7 @@ TEST(AddressSanitizer, ThreadNamesTest)
 #if ASAN_NEEDS_SEGV
 TEST(AddressSanitizer, ShadowGapTest) {
 #if SANITIZER_WORDSIZE == 32
-  char *addr = (char*)0x22000000;
+  char *addr = (char*)0x23000000;
 #else
 # if defined(__powerpc64__)
   char *addr = (char*)0x024000800000;




More information about the llvm-commits mailing list