[PATCH] D37366: Fix check-llvm on kernel 4.9+ with asan or msan

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 31 18:07:33 PDT 2017


vitalybuka created this revision.

Before https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?h=v4.9.46&id=84638335900f1995495838fe1bd4870c43ec1f67
test worked because memory allocated with mmap was not counted against RLIMIT_DATA.


https://reviews.llvm.org/D37366

Files:
  tools/bugpoint/bugpoint.cpp


Index: tools/bugpoint/bugpoint.cpp
===================================================================
--- tools/bugpoint/bugpoint.cpp
+++ tools/bugpoint/bugpoint.cpp
@@ -169,6 +169,11 @@
       MemoryLimit = 800;
     else
       MemoryLimit = 400;
+#if LLVM_ADDRESS_SANITIZER_BUILD || LLVM_MEMORY_SANITIZER_BUILD
+    // Starting from kernel 4.9 memory allocated with mmap is counted against
+    // RLIMIT_DATA. Sanitizers need to allocate tens of terabytes for shadow.
+    MemoryLimit = 0;
+#endif
   }
 
   BugDriver D(argv[0], FindBugs, TimeoutValue, MemoryLimit, UseValgrind,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37366.113495.patch
Type: text/x-patch
Size: 584 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170901/67015d67/attachment.bin>


More information about the llvm-commits mailing list