[PATCH] D45762: [LibFuzzer] Add support for an optional user defined callback (`LLVMFuzzerOnExitHandler()`)
Dan Liew via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 18 05:30:36 PDT 2018
delcypher created this revision.
delcypher added reviewers: kcc, george.karpenkov, kubamracek.
Herald added a subscriber: Sanitizers.
[LibFuzzer] Add support for an optional user defined callback (`LLVMFuzzerOnExitHandler()`)
which is called when LibFuzzer exits.
This callback will be called by LibFuzzer when it exits in most
scenarios. It currently doesn't call the callback if:
- LibFuzzer is launched incorrectly.
- LibFuzzer observes that the client corrupts the fuzzing input.
This upstreams a change from the JFS solver's fork of LibFuzzer. JFS's use
case is to ensure that an event log gets flushed to disk whenever
LibFuzzer decides that it wants to exit. There are probably other use
cases too.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D45762
Files:
lib/fuzzer/FuzzerDefs.h
lib/fuzzer/FuzzerDriver.cpp
lib/fuzzer/FuzzerExtFunctions.def
lib/fuzzer/FuzzerInterface.h
lib/fuzzer/FuzzerInternal.h
lib/fuzzer/FuzzerLoop.cpp
test/fuzzer/FuzzerOnExitHandlerTest.cpp
test/fuzzer/fuzzer-on-exit-handler-leaks.test
test/fuzzer/fuzzer-on-exit-handler.test
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D45762.142909.patch
Type: text/x-patch
Size: 11680 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180418/405ca649/attachment.bin>
More information about the llvm-commits
mailing list