HomePhabricator

[libFuzzer] Instrument bcmp

Authored by MaskRay on Jul 24 2020, 12:23 AM.

Description

[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.

Details

Committed
MaskRayJul 24 2020, 12:24 AM
Parents
rG99d03f039194: [MLIR][LLVMDialect] Added branch weights attribute to CondBrOp
Branches
Unknown
Tags
Unknown