hanchenye-llvm-project/compiler-rt/lib/fuzzer
Hans Wennborg c7bd643599 [libFuzzer] Use octal instead of hex escape sequences in PrintASCII
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
2021-10-04 11:29:54 +02:00
..
afl
dataflow
scripts
standalone
tests [libFuzzer] Use octal instead of hex escape sequences in PrintASCII 2021-10-04 11:29:54 +02:00
CMakeLists.txt [compiler-rt] NFC: Fix trivial typo 2021-09-04 14:12:58 +05:30
FuzzerBuiltins.h
FuzzerBuiltinsMsvc.h
FuzzerCommand.h
FuzzerCorpus.h
FuzzerCrossOver.cpp
FuzzerDataFlowTrace.cpp [compiler-rt] NFC: Fix trivial typo 2021-09-04 14:12:58 +05:30
FuzzerDataFlowTrace.h
FuzzerDefs.h
FuzzerDictionary.h [libFuzzer] Fix two typos 2021-10-01 13:15:43 +02:00
FuzzerDriver.cpp Redistribute energy for Corpus 2021-09-08 09:22:45 -07:00
FuzzerExtFunctions.def
FuzzerExtFunctions.h
FuzzerExtFunctionsDlsym.cpp
FuzzerExtFunctionsWeak.cpp
FuzzerExtFunctionsWindows.cpp
FuzzerExtraCounters.cpp Enable extra coverage counters on Windows 2021-08-05 11:40:15 -07:00
FuzzerExtraCountersDarwin.cpp [libFuzzer] Add missing include on Darwin. 2021-08-05 12:27:13 -07:00
FuzzerExtraCountersWindows.cpp [fuzzer] Fix building on case sensitive mingw platforms 2021-08-06 08:53:13 +03:00
FuzzerFlags.def Redistribute energy for Corpus 2021-09-08 09:22:45 -07:00
FuzzerFork.cpp [libFuzzer] Add missing argument to CrashResistantMerge. 2021-09-08 11:48:33 -07:00
FuzzerFork.h
FuzzerIO.cpp [libFuzzer] Use octal instead of hex escape sequences in PrintASCII 2021-10-04 11:29:54 +02:00
FuzzerIO.h [libFuzzer] Use octal instead of hex escape sequences in PrintASCII 2021-10-04 11:29:54 +02:00
FuzzerIOPosix.cpp
FuzzerIOWindows.cpp
FuzzerInterceptors.cpp
FuzzerInterface.h
FuzzerInternal.h Greedy set cover implementation of `Merger::Merge` 2021-09-07 09:42:38 -07:00
FuzzerLoop.cpp
FuzzerMain.cpp
FuzzerMerge.cpp Greedy set cover implementation of `Merger::Merge` 2021-09-07 09:42:38 -07:00
FuzzerMerge.h Greedy set cover implementation of `Merger::Merge` 2021-09-07 09:42:38 -07:00
FuzzerMutate.cpp
FuzzerMutate.h
FuzzerOptions.h Redistribute energy for Corpus 2021-09-08 09:22:45 -07:00
FuzzerPlatform.h
FuzzerRandom.h
FuzzerSHA1.cpp
FuzzerSHA1.h
FuzzerTracePC.cpp [compiler-rt] NFC: Fix trivial typo 2021-09-04 14:12:58 +05:30
FuzzerTracePC.h
FuzzerUtil.cpp [libFuzzer] Use octal instead of hex escape sequences in PrintASCII 2021-10-04 11:29:54 +02:00
FuzzerUtil.h
FuzzerUtilDarwin.cpp
FuzzerUtilFuchsia.cpp [fuzzer][fuchsia] Close exception channel before exiting. 2021-09-16 11:57:12 -07:00
FuzzerUtilLinux.cpp
FuzzerUtilPosix.cpp
FuzzerUtilWindows.cpp
FuzzerValueBitMap.h
README.txt
build.sh

README.txt

See http://llvm.org/docs/LibFuzzer.html