mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-19 16:47:28 +01:00
Edit fuzz' .c files to be C, not C++
This commit is contained in:
1 parent
5ad9055572
commit
2a97a1ad29
4 files changed
+16
-8
No files matched your search
@@ -1,5 +1,5 @@
|
||||
This directory contains multiple programs to fuzz Wuffs' implementations of
|
||||
various codecs. For example, `gif_fuzzer.cc` is a program to fuzz Wuffs' GIF
|
||||
various codecs. For example, `gif_fuzzer.c` is a program to fuzz Wuffs' GIF
|
||||
implementation.
|
||||
|
||||
They are typically run indirectly, by a fuzzing framework such as
|
||||
@@ -9,5 +9,5 @@ directory's code.
|
||||
|
||||
When working on these files, it is possible to run them directly on an explicit
|
||||
test suite, in order to speed up the edit-compile-run cycle. Look for
|
||||
`WUFFS_CONFIG__FUZZLIB_MAIN` in the C++ code for more details, and in
|
||||
`seed_corpora.txt` for suggested test data.
|
||||
`WUFFS_CONFIG__FUZZLIB_MAIN` for more details, and in `seed_corpora.txt` for
|
||||
suggested test data.
|
||||
@@ -23,7 +23,7 @@ such as https://github.com/google/oss-fuzz calling LLVMFuzzerTestOneInput.
|
||||
When working on the fuzz implementation, or as a sanity check, defining
|
||||
WUFFS_CONFIG__FUZZLIB_MAIN will let you manually run fuzz over a set of files:
|
||||
|
||||
g++ -DWUFFS_CONFIG__FUZZLIB_MAIN gif_fuzzer.cc
|
||||
gcc -DWUFFS_CONFIG__FUZZLIB_MAIN gif_fuzzer.c
|
||||
./a.out ../../../test/data/*.gif
|
||||
rm -f ./a.out
|
||||
|
||||
@@ -36,7 +36,7 @@ It should print "PASS", amongst other information, and exit(0).
|
||||
// relative includes, you can use the script/inline-c-relative-includes.go
|
||||
// program to generate a stand-alone C file.
|
||||
#include "../../../gen/c/std/gif.c"
|
||||
#include "../fuzzlib/fuzzlib.cc"
|
||||
#include "../fuzzlib/fuzzlib.c"
|
||||
|
||||
void fuzz(wuffs_base__io_reader src_reader, uint32_t hash) {
|
||||
void* pixbuf = NULL;
|
||||
|
||||
@@ -23,7 +23,7 @@ such as https://github.com/google/oss-fuzz calling LLVMFuzzerTestOneInput.
|
||||
When working on the fuzz implementation, or as a sanity check, defining
|
||||
WUFFS_CONFIG__FUZZLIB_MAIN will let you manually run fuzz over a set of files:
|
||||
|
||||
g++ -DWUFFS_CONFIG__FUZZLIB_MAIN zlib_fuzzer.cc
|
||||
gcc -DWUFFS_CONFIG__FUZZLIB_MAIN zlib_fuzzer.c
|
||||
./a.out ../../../test/data/*.zlib
|
||||
rm -f ./a.out
|
||||
|
||||
@@ -38,7 +38,7 @@ It should print "PASS", amongst other information, and exit(0).
|
||||
#include "../../../gen/c/std/adler32.c"
|
||||
#include "../../../gen/c/std/deflate.c"
|
||||
#include "../../../gen/c/std/zlib.c"
|
||||
#include "../fuzzlib/fuzzlib.cc"
|
||||
#include "../fuzzlib/fuzzlib.c"
|
||||
|
||||
void fuzz(wuffs_base__io_reader src_reader, uint32_t hash) {
|
||||
wuffs_zlib__status s;
|
||||
|
||||
Reference in new issue
Block a user