[compiler-rt] r341562 - [libfuzzer] Fix fuzzer-oom.test on windows and reenable it.

Max Moroz via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 6 09:48:18 PDT 2018


Author: dor1s
Date: Thu Sep  6 09:48:18 2018
New Revision: 341562

URL: http://llvm.org/viewvc/llvm-project?rev=341562&view=rev
Log:
[libfuzzer] Fix fuzzer-oom.test on windows and reenable it.

Summary: Patch by Jonathan Metzman (@metzman).

Reviewers: Dor1s, morehouse

Reviewed By: Dor1s

Subscribers: delcypher, llvm-commits, #sanitizers

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

Modified:
    compiler-rt/trunk/test/fuzzer/fuzzer-oom.test

Modified: compiler-rt/trunk/test/fuzzer/fuzzer-oom.test
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/fuzzer/fuzzer-oom.test?rev=341562&r1=341561&r2=341562&view=diff
==============================================================================
--- compiler-rt/trunk/test/fuzzer/fuzzer-oom.test (original)
+++ compiler-rt/trunk/test/fuzzer/fuzzer-oom.test Thu Sep  6 09:48:18 2018
@@ -1,18 +1,21 @@
-# FIXME: Disabled on Windows until symbolization works properly.
-UNSUPPORTED: aarch64, windows
-RUN: %cpp_compiler %S/OutOfMemoryTest.cpp -o %t-OutOfMemoryTest
-RUN: %cpp_compiler %S/OutOfMemorySingleLargeMallocTest.cpp -o %t-OutOfMemorySingleLargeMallocTest
-RUN: %cpp_compiler %S/AccumulateAllocationsTest.cpp -o %t-AccumulateAllocationsTest
+UNSUPPORTED: aarch64
+# Tests break on windows unless exe extension is used (because there are periods
+# in expansion of %t, the string after the period is interpreted as the file
+# extension, so each compilation will clobber the previous one's lib and exp
+# files causing symbolization to break).
+RUN: %cpp_compiler %S/OutOfMemoryTest.cpp -o %t-OutOfMemoryTest.exe
+RUN: %cpp_compiler %S/OutOfMemorySingleLargeMallocTest.cpp -o %t-OutOfMemorySingleLargeMallocTest.exe
+RUN: %cpp_compiler %S/AccumulateAllocationsTest.cpp -o %t-AccumulateAllocationsTest.exe
 
-RUN: not %run %t-OutOfMemoryTest -rss_limit_mb=300 2>&1 | FileCheck %s
+RUN: not %run %t-OutOfMemoryTest.exe -rss_limit_mb=300 2>&1 | FileCheck %s
 
 CHECK: ERROR: libFuzzer: out-of-memory (used: {{.*}}; limit: 300Mb)
 CHECK: Test unit written to ./oom-
 SUMMARY: libFuzzer: out-of-memory
 
-RUN: not %run %t-OutOfMemorySingleLargeMallocTest -rss_limit_mb=300    2>&1 | FileCheck %s --check-prefix=SINGLE_LARGE_MALLOC
-RUN: not %run %t-OutOfMemorySingleLargeMallocTest -malloc_limit_mb=300 2>&1 | FileCheck %s --check-prefix=SINGLE_LARGE_MALLOC
-RUN: not %run %t-OutOfMemorySingleLargeMallocTest -rss_limit_mb=1000 -malloc_limit_mb=300 2>&1 | FileCheck %s --check-prefix=SINGLE_LARGE_MALLOC
+RUN: not %run %t-OutOfMemorySingleLargeMallocTest.exe -rss_limit_mb=300    2>&1 | FileCheck %s --check-prefix=SINGLE_LARGE_MALLOC
+RUN: not %run %t-OutOfMemorySingleLargeMallocTest.exe -malloc_limit_mb=300 2>&1 | FileCheck %s --check-prefix=SINGLE_LARGE_MALLOC
+RUN: not %run %t-OutOfMemorySingleLargeMallocTest.exe -rss_limit_mb=1000 -malloc_limit_mb=300 2>&1 | FileCheck %s --check-prefix=SINGLE_LARGE_MALLOC
 
 We used to check for "out-of-memory (malloc(53{{.*}}))", but that would fail
 sometimes, so now we accept any OOM message.
@@ -21,4 +24,4 @@ SINGLE_LARGE_MALLOC: libFuzzer: out-of-m
 SINGLE_LARGE_MALLOC: in LLVMFuzzerTestOneInput
 
 # Check that -rss_limit_mb=0 means no limit.
-RUN: %run %t-AccumulateAllocationsTest -runs=1000 -rss_limit_mb=0
+RUN: %run %t-AccumulateAllocationsTest.exe -runs=1000 -rss_limit_mb=0




More information about the llvm-commits mailing list