Without this change, tests in coverage.test and dump_coverage.test are failing on non-x86_64 platforms.
The diff is copied from sanitizer_common library, an alternative would be to link it together with libFuzzer.
Details
- Reviewers
kubamracek kcc morehouse Dor1s - Commits
- rGf28523bb3fd6: [libFuzzer] Generalize the code for getting the previous offset for different…
rCRT344104: [libFuzzer] Generalize the code for getting the previous offset for different…
rL344104: [libFuzzer] Generalize the code for getting the previous offset for different…
Diff Detail
Event Timeline
@morehouse After this and the linked change, it should be safe to re-enable coverage.test on AArch64.
I should admit that I'm not familiar with ARM offsets, but since the change fixes the test, LGTM.
compiler-rt/lib/fuzzer/FuzzerTracePC.cpp | ||
---|---|---|
202 | Are you sure you need -3 here, not -2? I'm definitely not an expert here, so it's more like a sanity check question :) >>> hex((0x122 - 3) & (~1)) '0x11e' >>> hex((0x122 - 2) & (~1)) '0x120' | |
213 | some comment here might be useful too |
Btw, @george.karpenkov, have you every experienced anything similar to https://bugs.chromium.org/p/chromium/issues/detail?id=892167 ?
@Dor1s I have definitely seen this error, but at some point it disappeared. I do not recall exactly the circumstances, maybe it appeared when the compiler version did not match exactly the runtime version.
compiler-rt/lib/fuzzer/FuzzerTracePC.cpp | ||
---|---|---|
221 | Could we avoid putting ifdefs here? Maybe they could go in FuzzerDefs.h. |
compiler-rt/lib/fuzzer/FuzzerTracePC.cpp | ||
---|---|---|
221 | I don't think this is a good idea.
|
compiler-rt/lib/fuzzer/FuzzerTracePC.cpp | ||
---|---|---|
221 | Ok, then let's add a comment saying where this code came from. |
compiler-rt/lib/fuzzer/FuzzerTracePC.cpp | ||
---|---|---|
221 | OK! |
Are you sure you need -3 here, not -2? I'm definitely not an expert here, so it's more like a sanity check question :)