This is an archive of the discontinued LLVM Phabricator instance.

[libFuzzer] Make coverage.test work on ARM64
ClosedPublic

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

Details

Summary

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

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

rdar://47646400

Diff Detail

Event Timeline

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

LGTM

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