Page MenuHomePhabricator

[libFuzzer] Make coverage.test work on ARM64

Authored by yln on Mon, Feb 11, 4:20 PM.



This test instruments the following code with coverage, runs the fuzzer
once, and asserts that there are uncovered PCs. The ARM64 backend
optimizes this code using the csel (Conditional select) instruction,
which removes all branching from the resulting machine code. The test
then fails because we do not have any uncovered PCs. The easiest
solution for now is to turn off optimization for the DSOs used in this

int DSO1(int a) {
  if (a < 123456)
    return 0;
  return 1;


Diff Detail

Event Timeline

yln created this revision.Mon, Feb 11, 4:20 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptMon, Feb 11, 4:20 PM
Herald added subscribers: llvm-commits, Restricted Project, kristof.beyls, javed.absar. · View Herald Transcript
kcc accepted this revision.Mon, Feb 11, 4:30 PM


This revision is now accepted and ready to land.Mon, Feb 11, 4:30 PM
This revision was automatically updated to reflect the committed changes.