Skip to content

Commit

Permalink
test/fuzzers: fix build of standard_fuzzer
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed Feb 1, 2019
1 parent dae4a3b commit 36638e7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/fuzzers/README.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ https://bugs.chromium.org/p/oss-fuzz/issues/list?q=proj4

- Build standard_fuzzer in a standalone mode:

$ g++ -g -std=c++11 standard_fuzzer.cpp -o standard_fuzzer -DSTANDALONE ../../src/.libs/libproj.a -lpthread -I../../src
$ g++ -g -std=c++11 standard_fuzzer.cpp -o standard_fuzzer -fvisibility=hidden -DSTANDALONE ../../src/.libs/libproj.a -lpthread -lsqlite3 -I../../src -I../../include

Run it:
$ PROJ_LIB=../../data ./standard_fuzzer {file_generated_by_oss_fuzz}
Expand Down
2 changes: 1 addition & 1 deletion test/fuzzers/build_google_oss_fuzzers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ build_fuzzer()
shift
shift
echo "Building fuzzer $fuzzerName"
$CXX $CXXFLAGS -std=c++11 -I$SRC_DIR/src \
$CXX $CXXFLAGS -std=c++11 -fvisibility=hidden -I$SRC_DIR/src -I$SRC_DIR/include \
$sourceFilename $* -o $OUT/$fuzzerName \
-lFuzzingEngine $SRC_DIR/src/.libs/libproj.a -lpthread /usr/lib/x86_64-linux-gnu/libsqlite3.a $EXTRA_LIBS
}
Expand Down
4 changes: 2 additions & 2 deletions test/fuzzers/standard_fuzzer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
#include <sys/types.h>
#include <unistd.h>

#include "projects.h" // For pj_gc_unloadall()
#include "proj_internal.h" // For pj_gc_unloadall()
#include "proj_api.h"

/* Standalone build:
g++ -g -std=c++11 standard_fuzzer.cpp -o standard_fuzzer -DSTANDALONE ../../src/.libs/libproj.a -lpthread -I../../src
g++ -g -std=c++11 standard_fuzzer.cpp -o standard_fuzzer -fvisibility=hidden -DSTANDALONE ../../src/.libs/libproj.a -lpthread -lsqlite3 -I../../src -I../../include
*/

extern "C" int LLVMFuzzerInitialize(int* argc, char*** argv);
Expand Down

0 comments on commit 36638e7

Please sign in to comment.