[PATCH] D50483: [SanitizerCoverage] Add associated metadata to PC guards.
Matt Morehouse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 9 16:22:05 PDT 2018
morehouse added inline comments.
================
Comment at: compiler-rt/lib/fuzzer/FuzzerTracePC.cpp:230
+ assert(
+ PCs()[GuardIdx] - ModulePCTable[i].Start[j].PC < 100 &&
+ "PC table entry doesn't match address from PC guard callback");
----------------
eugenis wrote:
> Why 100?
Nothing special about the number except that it's over twice the max distance I've observed between __builtin_return_address(0) from the PC guard callback and the block start address from the PC table.
================
Comment at: llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp:406
// so we need to prevent them from being dead stripped.
- if (TargetTriple.isOSBinFormatMachO())
- appendToUsed(M, GlobalsToAppendToUsed);
----------------
eugenis wrote:
> You are removing MachO-specific code. But !associated is ELF-specific. It has no effect on MachO. What's up with that?
>
You're right, I will add this back.
https://reviews.llvm.org/D50483
More information about the llvm-commits
mailing list