brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · ca6ca73 Raw
28 lines · plain
1UNSUPPORTED: target=aarch64{{.*}}, ios2# Tests break on windows unless exe extension is used (because there are periods3# in expansion of %t, the string after the period is interpreted as the file4# extension, so each compilation will clobber the previous one's lib and exp5# files causing symbolization to break).6RUN: %cpp_compiler %S/OutOfMemoryTest.cpp -o %t-OutOfMemoryTest.exe7RUN: %cpp_compiler %S/OutOfMemorySingleLargeMallocTest.cpp -o %t-OutOfMemorySingleLargeMallocTest.exe8RUN: %cpp_compiler %S/AccumulateAllocationsTest.cpp -o %t-AccumulateAllocationsTest.exe9 10RUN: not %run %t-OutOfMemoryTest.exe -rss_limit_mb=300 2>&1 | FileCheck %s11 12CHECK: ERROR: libFuzzer: out-of-memory (used: {{.*}}; limit: 300Mb)13CHECK: Test unit written to ./oom-14SUMMARY: libFuzzer: out-of-memory15 16RUN: not %run %t-OutOfMemorySingleLargeMallocTest.exe -rss_limit_mb=300    2>&1 | FileCheck %s --check-prefix=SINGLE_LARGE_MALLOC17RUN: not %run %t-OutOfMemorySingleLargeMallocTest.exe -malloc_limit_mb=300 2>&1 | FileCheck %s --check-prefix=SINGLE_LARGE_MALLOC18RUN: not %run %t-OutOfMemorySingleLargeMallocTest.exe -rss_limit_mb=1000 -malloc_limit_mb=300 2>&1 | FileCheck %s --check-prefix=SINGLE_LARGE_MALLOC19 20We used to check for "out-of-memory (malloc(53{{.*}}))", but that would fail21sometimes, so now we accept any OOM message.22 23SINGLE_LARGE_MALLOC: libFuzzer: out-of-memory24SINGLE_LARGE_MALLOC: in LLVMFuzzerTestOneInput25 26# Check that -rss_limit_mb=0 means no limit.27RUN: %run %t-AccumulateAllocationsTest.exe -runs=1000 -rss_limit_mb=028