Repository navigation
Conversation
zlib's build.sh links $OUT/<fuzzer>_seed_corpus.zip to /out/seed_corpus.zip, which dangles on the host: is_elf() raised FileNotFoundError and aborted the run, and the coverage step skipped every fuzzer with such a corpus.
compile_args drops argv[0] for clang-extract, but the -E fallback reused it, so docker exec tried to run the first flag and failed with exit 127.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two small fixes in extract_functions.py that I needed to get the pipeline running on zlib (oss-fuzz pinned to 4bca88f3, your base-builder and base-runner images).
zlib's build.sh creates the per-fuzzer seed corpora as absolute links to /out/seed_corpus.zip, which dangle on the host, so is_elf() stopped the whole run with "FileNotFoundError: ... build/out/zlib/checksum_fuzzer_seed_corpus.zip". The first commit makes is_elf() skip anything that is not a regular file and maps a /out/... link back to build/out/, so the corpus is found and coverage runs. Before it, zlib gave 0 extracted functions; with it, 8 of the 10 fuzzers get coverage and 57 functions are extracted. gdk-pixbuf and poppler use the same kind of link at that oss-fuzz commit.
The second commit fixes the -E fallback in clang_and_extract(). compile_args drops the compiler, which is right for clang-extract, but the fallback runs the same list directly, so docker exec fails with 'exec: "-fPIC": executable file not found in $PATH' every time clang-extract fails. I forced the fallback on 10 zlib functions: 0 of 10 before, 10 of 10 after.
PR #4 already covers the problems in compile_ossfuzz.py; these two are separate and don't touch the same files.