c7bd643599
Previously, PrintASCII would print the string "\ta" as "\x09a". However, in C/C++ those strings are not the same: the trailing 'a' is part of the escape sequence, which means it's equivalent to "\x9a". This is an annoying quirk of the standard. (See https://eel.is/c++draft/lex.ccon#nt:hexadecimal-escape-sequence) To fix this, output three-digit octal escape sequences instead. Since octal escapes are limited to max three digits, this avoids the problem of subsequent characters unintentionally becoming part of the escape sequence. Dictionary files still use the non-C-compatible hex escapes, but I believe we can't change the format since it comes from AFL, and libfuzzer never writes such files, it only has to read them, so they're not affected by this change. Differential revision: https://reviews.llvm.org/D110920 |
||
---|---|---|
.. | ||
afl | ||
dataflow | ||
scripts | ||
standalone | ||
tests | ||
CMakeLists.txt | ||
FuzzerBuiltins.h | ||
FuzzerBuiltinsMsvc.h | ||
FuzzerCommand.h | ||
FuzzerCorpus.h | ||
FuzzerCrossOver.cpp | ||
FuzzerDataFlowTrace.cpp | ||
FuzzerDataFlowTrace.h | ||
FuzzerDefs.h | ||
FuzzerDictionary.h | ||
FuzzerDriver.cpp | ||
FuzzerExtFunctions.def | ||
FuzzerExtFunctions.h | ||
FuzzerExtFunctionsDlsym.cpp | ||
FuzzerExtFunctionsWeak.cpp | ||
FuzzerExtFunctionsWindows.cpp | ||
FuzzerExtraCounters.cpp | ||
FuzzerExtraCountersDarwin.cpp | ||
FuzzerExtraCountersWindows.cpp | ||
FuzzerFlags.def | ||
FuzzerFork.cpp | ||
FuzzerFork.h | ||
FuzzerIO.cpp | ||
FuzzerIO.h | ||
FuzzerIOPosix.cpp | ||
FuzzerIOWindows.cpp | ||
FuzzerInterceptors.cpp | ||
FuzzerInterface.h | ||
FuzzerInternal.h | ||
FuzzerLoop.cpp | ||
FuzzerMain.cpp | ||
FuzzerMerge.cpp | ||
FuzzerMerge.h | ||
FuzzerMutate.cpp | ||
FuzzerMutate.h | ||
FuzzerOptions.h | ||
FuzzerPlatform.h | ||
FuzzerRandom.h | ||
FuzzerSHA1.cpp | ||
FuzzerSHA1.h | ||
FuzzerTracePC.cpp | ||
FuzzerTracePC.h | ||
FuzzerUtil.cpp | ||
FuzzerUtil.h | ||
FuzzerUtilDarwin.cpp | ||
FuzzerUtilFuchsia.cpp | ||
FuzzerUtilLinux.cpp | ||
FuzzerUtilPosix.cpp | ||
FuzzerUtilWindows.cpp | ||
FuzzerValueBitMap.h | ||
README.txt | ||
build.sh |
README.txt
See http://llvm.org/docs/LibFuzzer.html