[PATCH] D19112: [asan] [SystemZ] Add slop for stack address detection.

Marcin Koƛcielnicki via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 15 10:39:49 PDT 2016


koriakin updated this revision to Diff 53913.

Repository:
  rL LLVM

http://reviews.llvm.org/D19112

Files:
  lib/asan/asan_posix.cc

Index: lib/asan/asan_posix.cc
===================================================================
--- lib/asan/asan_posix.cc
+++ lib/asan/asan_posix.cc
@@ -43,7 +43,14 @@
   // Access at a reasonable offset above SP, or slightly below it (to account
   // for x86_64 or PowerPC redzone, ARM push of multiple registers, etc) is
   // probably a stack overflow.
+#ifdef __s390__
+  // For s390, allow a full page of slop - the address from siginfo only has
+  // page granularity.
+  bool IsStackAccess = sig.addr >= (sig.sp & ~0xFFF) &&
+                       sig.addr < sig.sp + 0xFFFF;
+#else
   bool IsStackAccess = sig.addr + 512 > sig.sp && sig.addr < sig.sp + 0xFFFF;
+#endif
 
 #if __powerpc__
   // Large stack frames can be allocated with e.g.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D19112.53913.patch
Type: text/x-patch
Size: 753 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160415/57106aba/attachment.bin>


More information about the llvm-commits mailing list