1a43d950b4
Update several links to allow the remote to use its configured default branch name, rather than specifying `master` as the default branch name. This will help avoid breakage if any of these projects rename their default branch in the future. Fix a few of the links where they were hitting redirects or had moved. Signed-off-by: Philip Withnall <pwithnall@endlessos.org> Helps: #2348 |
||
---|---|---|
.. | ||
driver.c | ||
fuzz_bookmark.c | ||
fuzz_bookmark.corpus | ||
fuzz_canonicalize_filename.c | ||
fuzz_date_parse.c | ||
fuzz_date_time_new_from_iso8601.c | ||
fuzz_dbus_message.c | ||
fuzz_inet_address_mask_new_from_string.c | ||
fuzz_inet_address_new_from_string.c | ||
fuzz_inet_socket_address_new_from_string.c | ||
fuzz_key.c | ||
fuzz_key.corpus | ||
fuzz_network_address_parse_uri.c | ||
fuzz_network_address_parse.c | ||
fuzz_paths.c | ||
fuzz_uri_escape.c | ||
fuzz_uri_parse_params.c | ||
fuzz_uri_parse.c | ||
fuzz_variant_binary.c | ||
fuzz_variant_text.c | ||
fuzz_variant_text.dict | ||
fuzz.h | ||
meson.build | ||
README.md |
Fuzz targets used by oss-fuzz.
Useful links: Dashboard (requires access), Build logs, Coverage
How to add new targets
Add fuzz_target_name.c and edit meson.build
accordingly.
New targets are picked up by oss-fuzz automatically within a day. Targets must not be renamed once added.
Add (optional) fuzz_target_name.dict containing keywords and magic bytes.
Add (optional) fuzz_target_name.corpus with file names on separate lines. Wildcards ?
, *
and **
are supported. Examples below.
glib/* # all files in directory glib
glib/** # all files in directory glib and sub-directories
**.xbel # all files ending with .xbel in the repository
Recommended reading: Fuzz Target, Dictionaries, Corpus
How to reproduce oss-fuzz bugs locally
Build with at least the following flags, choosing a sanitizer as needed. A somewhat recent version of clang is recommended.
$ CC=clang CXX=clang++ meson DIR -Db_sanitize=<address|undefined> -Db_lundef=false
Afterwards run the affected target against the provided test case.
$ DIR/fuzzing/fuzz_target_name FILE
FAQs
What about Memory Sanitizer (MSAN)?
Correct MSAN instrumentation is difficult to achieve locally, so false positives are very likely to mask the actual bug.
If need be, you can still reproduce those bugs with the oss-fuzz provided docker images.
There are no file/function names in the stack trace.
llvm-symbolizer
must be in PATH
.
UndefinedBehavior Sanitizer (UBSAN) doesn't provide a stack trace.
Set environment variable UBSAN_OPTIONS
to print_stacktrace=1
prior to running the target.