HomePhabricator

[libFuzzer] Make coverage.test work on ARM64

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

Description

[libFuzzer] Make coverage.test work on ARM64

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

Reviewers: kcc

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D58087

llvm-svn: 353780

Details

Committed
ylnFeb 11 2019, 4:37 PM
Differential Revision
D58087: [libFuzzer] Make coverage.test work on ARM64
Parents
rG806136f8ef1c: [LoopReroll] Fix reroll root legality checking.
Branches
Unknown
Tags
Unknown