[compiler-rt] r233413 - Add another sanity check for swapcontext, which is currently unsupported. Patch by Alexey Samsonov!

Nick Lewycky nicholas at mxc.ca
Fri Mar 27 13:40:23 PDT 2015


Author: nicholas
Date: Fri Mar 27 15:40:23 2015
New Revision: 233413

URL: http://llvm.org/viewvc/llvm-project?rev=233413&view=rev
Log:
Add another sanity check for swapcontext, which is currently unsupported. Patch by Alexey Samsonov!

Modified:
    compiler-rt/trunk/lib/asan/asan_interceptors.cc

Modified: compiler-rt/trunk/lib/asan/asan_interceptors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_interceptors.cc?rev=233413&r1=233412&r2=233413&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_interceptors.cc Fri Mar 27 15:40:23 2015
@@ -290,7 +290,7 @@ static void ClearShadowMemoryForContextS
   ssize += stack - bottom;
   ssize = RoundUpTo(ssize, PageSize);
   static const uptr kMaxSaneContextStackSize = 1 << 22;  // 4 Mb
-  if (ssize && ssize <= kMaxSaneContextStackSize) {
+  if (AddrIsInMem(bottom) && ssize && ssize <= kMaxSaneContextStackSize) {
     PoisonShadow(bottom, ssize, 0);
   }
 }





More information about the llvm-commits mailing list