[PATCH] D35602: Generate error reports when a fuzz target exits.

Matt Morehouse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 18 19:15:21 PDT 2017


morehouse created this revision.
Herald added subscribers: hiraditya, eraman.

Flush stdout before exiting in test cases.

Since the atexit hook is used for exit reports, pending prints to
stdout can be lost if they aren't flushed before calling exit().

Expect tests to have non-zero exit code if exit() is called.


https://reviews.llvm.org/D35602

Files:
  llvm/lib/Fuzzer/FuzzerDriver.cpp
  llvm/lib/Fuzzer/FuzzerInternal.h
  llvm/lib/Fuzzer/FuzzerLoop.cpp
  llvm/lib/Fuzzer/test/AbsNegAndConstant64Test.cpp
  llvm/lib/Fuzzer/test/AbsNegAndConstantTest.cpp
  llvm/lib/Fuzzer/test/BufferOverflowOnInput.cpp
  llvm/lib/Fuzzer/test/CustomCrossOverTest.cpp
  llvm/lib/Fuzzer/test/CustomMutatorTest.cpp
  llvm/lib/Fuzzer/test/NthRunCrashTest.cpp
  llvm/lib/Fuzzer/test/RepeatedBytesTest.cpp
  llvm/lib/Fuzzer/test/SimpleDictionaryTest.cpp
  llvm/lib/Fuzzer/test/SimpleTest.cpp
  llvm/lib/Fuzzer/test/SimpleThreadedTest.cpp
  llvm/lib/Fuzzer/test/exit-report.test
  llvm/lib/Fuzzer/test/fuzzer-flags.test
  llvm/lib/Fuzzer/test/fuzzer-printcovpcs.test
  llvm/lib/Fuzzer/test/fuzzer.test
  llvm/lib/Fuzzer/test/inline-8bit-counters.test
  llvm/lib/Fuzzer/test/repeated-bytes.test
  llvm/lib/Fuzzer/test/trace-pc.test
  llvm/lib/Fuzzer/test/ulimit.test

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35602.107235.patch
Type: text/x-patch
Size: 13567 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170719/052d3295/attachment.bin>


More information about the llvm-commits mailing list