[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
This commit is contained in:
Evgenii Stepanov 2020-11-23 16:01:13 -08:00
parent c74b427cb2
commit 237b024b06

View File

@ -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();