From 237b024b06df4305b1a0400f60cffc6b39fb3f5a Mon Sep 17 00:00:00 2001 From: Evgenii Stepanov Date: Mon, 23 Nov 2020 16:01:13 -0800 Subject: [PATCH] [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 --- compiler-rt/test/hwasan/TestCases/sizes.cpp | 2 -- 1 file changed, 2 deletions(-) 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::max();