Skip to content

Commit 0744d3c

Browse files
committedSep 20, 2018
[fuzzer] Replace FuzzerExtFunctionsDlsymWin.cpp with FuzzerExtFunctionsWeakAlias.cpp
Summary: Replace FuzzerExtFunctionsDlsymWin.cpp with FuzzerExtFunctionsWeakAlias.cpp to get externally defined functions (eg: LLVMFuzzerInitialize, LLVMFuzzerCustomMutator, etc) working again. Also enable tests that depended on these functions (on windows) Reviewers: rnk, morehouse Reviewed By: rnk, morehouse Subscribers: rnk, morehouse, mgorny Differential Revision: https://reviews.llvm.org/D51700 llvm-svn: 342698
1 parent fec72d2 commit 0744d3c

8 files changed

+1
-76
lines changed
 

‎compiler-rt/lib/fuzzer/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set(LIBFUZZER_SOURCES
33
FuzzerDataFlowTrace.cpp
44
FuzzerDriver.cpp
55
FuzzerExtFunctionsDlsym.cpp
6-
FuzzerExtFunctionsDlsymWin.cpp
6+
FuzzerExtFunctionsWeakAlias.cpp
77
FuzzerExtFunctionsWeak.cpp
88
FuzzerExtraCounters.cpp
99
FuzzerIO.cpp

‎compiler-rt/lib/fuzzer/FuzzerExtFunctionsDlsymWin.cpp

-62
This file was deleted.

‎compiler-rt/test/fuzzer/bogus-initialize.test

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# FIXME: Disabled on Windows since LLVMFuzzerInitialize does not yet work.
2-
UNSUPPORTED: windows
31
RUN: %cpp_compiler %S/BogusInitializeTest.cpp -o %t-BogusInitializeTest
42

53
RUN: not %run %t-BogusInitializeTest 2>&1 | FileCheck %s --check-prefix=BOGUS_INITIALIZE

‎compiler-rt/test/fuzzer/fuzzer-customcrossover.test

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# FIXME: Disabled on Windows since LLVMFuzzerCustomCrossOver does not yet work.
2-
UNSUPPORTED: windows
31
RUN: %cpp_compiler %S/CustomCrossOverTest.cpp -o %t-CustomCrossOverTest
42

53
RUN: not %run %t-CustomCrossOverTest -seed=1 -runs=1000000 2>&1 | FileCheck %s --check-prefix=CHECK_CO

‎compiler-rt/test/fuzzer/fuzzer-custommutator.test

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# FIXME: Disabled on Windows since LLVMFuzzerCustomMutator does not yet work.
2-
UNSUPPORTED: windows
31
RUN: %cpp_compiler %S/CustomMutatorTest.cpp -o %t-CustomMutatorTest
42
RUN: not %run %t-CustomMutatorTest 2>&1 | FileCheck %s --check-prefix=LLVMFuzzerCustomMutator
53
LLVMFuzzerCustomMutator: In LLVMFuzzerCustomMutator

‎compiler-rt/test/fuzzer/fuzzer-flags.test

-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
# FIXME: Disabled on Windows since LLVMFuzzerInitialize does not yet work.
2-
UNSUPPORTED: windows
3-
RUN: %cpp_compiler %S/FlagsTest.cpp -o %t-FlagsTest
41
RUN: %run %t-FlagsTest -runs=10 -foo_bar=1 2>&1 | FileCheck %s --check-prefix=FOO_BAR
52
FOO_BAR: WARNING: unrecognized flag '-foo_bar=1'; use -help=1 to list all flags
63
FOO_BAR: BINGO
-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# FIXME: Disabled on Windows since LLVMFuzzerInitialize does not yet work.
2-
UNSUPPORTED: windows
31
CHECK: BINGO
42
RUN: %cpp_compiler %S/InitializeTest.cpp -o %t-InitializeTest
53
RUN: not %run %t-InitializeTest -use_value_profile=1 2>&1 | FileCheck %s

‎compiler-rt/test/fuzzer/standalone.test

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
# FIXME: Disabled on Windows because memmem is a GNU extension.
2-
UNSUPPORTED: windows
31
RUN: %no_fuzzer_c_compiler %libfuzzer_src/standalone/StandaloneFuzzTargetMain.c -c -o %t_1.o
42
RUN: %no_fuzzer_cpp_compiler %S/InitializeTest.cpp -c -o %t_2.o
53

0 commit comments

Comments
 (0)