[all-commits] [llvm/llvm-project] 62e4dc: [libFuzzer] Fix off-by-one error in ApplyDictionar...
Matt Morehouse via All-commits
all-commits at lists.llvm.org
Mon May 3 10:38:19 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 62e4dca94e25668c9f70abc7e524328fd5c6d5c9
https://github.com/llvm/llvm-project/commit/62e4dca94e25668c9f70abc7e524328fd5c6d5c9
Author: Fabian Meumertzheim <meumertzheim at code-intelligence.com>
Date: 2021-05-03 (Mon, 03 May 2021)
Changed paths:
M compiler-rt/lib/fuzzer/FuzzerMutate.cpp
Log Message:
-----------
[libFuzzer] Fix off-by-one error in ApplyDictionaryEntry
In the overwrite branch of MutationDispatcher::ApplyDictionaryEntry in
FuzzerMutate.cpp, the index Idx at which W.size() bytes are overwritten
with the word W is chosen uniformly at random in the interval
[0, Size - W.size()). This means that Idx + W.size() will always be
strictly less than Size, i.e., the last byte of the current unit will
never be overwritten.
This is fixed by adding 1 to the exclusive upper bound.
Addresses https://bugs.llvm.org/show_bug.cgi?id=49989.
Reviewed By: morehouse
Differential Revision: https://reviews.llvm.org/D101625
Commit: ac512890b47032fcee167a702ab14da59137723c
https://github.com/llvm/llvm-project/commit/ac512890b47032fcee167a702ab14da59137723c
Author: Matt Morehouse <mascasa at google.com>
Date: 2021-05-03 (Mon, 03 May 2021)
Changed paths:
M compiler-rt/test/fuzzer/EntropicScalePerExecTimeTest.cpp
M compiler-rt/test/fuzzer/entropic-scale-per-exec-time.test
Log Message:
-----------
[libFuzzer] Deflake entropic exec-time test.
Compare: https://github.com/llvm/llvm-project/compare/89a94be16b01...ac512890b470
More information about the All-commits
mailing list