[all-commits] [llvm/llvm-project] f7ffb1: [libFuzzer] Instrument bcmp
Fangrui Song via All-commits
all-commits at lists.llvm.org
Fri Jul 24 00:25:06 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: f7ffb122d08e7a8203557898c67eaac3a857b152
https://github.com/llvm/llvm-project/commit/f7ffb122d08e7a8203557898c67eaac3a857b152
Author: Fangrui Song <maskray at google.com>
Date: 2020-07-24 (Fri, 24 Jul 2020)
Changed paths:
M compiler-rt/lib/fuzzer/FuzzerInterceptors.cpp
M compiler-rt/test/fuzzer/MemcmpTest.cpp
A compiler-rt/test/fuzzer/bcmp.test
Log Message:
-----------
[libFuzzer] Instrument bcmp
If we define memcmp in an archive, bcmp should be defined as well (many libc
define bcmp/memcmp in one object file). Otherwise if the application calls bcmp
or strcmp which gets optimized to bcmp (SimplifyLibCalls), the undefined
reference may pull in an optimized bcmp/strcmp implementation (libc replacement)
later on the linker command line. If both libFuzzer's memcmp and the optimized
memcmp are strong => there will be a multiple definition error.
More information about the All-commits
mailing list