[llvm-branch-commits] [compiler-rt] 237b024 - [hwasan] Fix tests when vm.overcommit_memory=1.

Evgenii Stepanov via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Nov 23 16:25:58 PST 2020


Author: Evgenii Stepanov
Date: 2020-11-23T16:05:56-08:00
New Revision: 237b024b06df4305b1a0400f60cffc6b39fb3f5a

URL: https://github.com/llvm/llvm-project/commit/237b024b06df4305b1a0400f60cffc6b39fb3f5a
DIFF: https://github.com/llvm/llvm-project/commit/237b024b06df4305b1a0400f60cffc6b39fb3f5a.diff

LOG: [hwasan] Fix tests when vm.overcommit_memory=1.

Remove an invalid check from sizes.cpp that only passes when overcommit is disabled.

Fixes PR48274.

Differential Revision: https://reviews.llvm.org/D91999

Added: 
    

Modified: 
    compiler-rt/test/hwasan/TestCases/sizes.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/hwasan/TestCases/sizes.cpp b/compiler-rt/test/hwasan/TestCases/sizes.cpp
index f397256e52e4..1bfc760e1f9e 100644
--- a/compiler-rt/test/hwasan/TestCases/sizes.cpp
+++ b/compiler-rt/test/hwasan/TestCases/sizes.cpp
@@ -49,8 +49,6 @@ int main(int argc, char **argv) {
   if (!untag_strcmp(argv[1], "malloc")) {
     void *p = malloc(MallocSize);
     assert(!p);
-    p = malloc(kMaxAllowedMallocSize - kChunkHeaderSize);
-    assert(!p);
   } else if (!untag_strcmp(argv[1], "calloc")) {
     // Trigger an overflow in calloc.
     size_t size = std::numeric_limits<size_t>::max();


        


More information about the llvm-branch-commits mailing list