Skip to content
This repository has been archived by the owner on Nov 1, 2023. It is now read-only.

Coverage recording fails for DWARF 5 #1781

Open
ranweiler opened this issue Apr 12, 2022 · 0 comments
Open

Coverage recording fails for DWARF 5 #1781

ranweiler opened this issue Apr 12, 2022 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@ranweiler
Copy link
Member

ranweiler commented Apr 12, 2022

Repro

  1. Build a Linux sample libfuzzer (like simple-libfuzzer) with clang 15 (note: 14 should be sufficient), just invoking make as usual
  2. Create a libfuzzer basic job with the target

Expected

Jobs run as expected, find crashes, and generate binary and source coverage.

Actual

The coverage task (only) fails unexpectedly with errors like:

[2022-04-11T22:02:34Z ERROR onefuzz_agent::managed::cmd] error running task: malformed debug info file
    Caused by:
        0: corrupted dwarf debug data
        1: Hit the end of input before it was expected

Comments

Verified on Ubuntu 18.04, with targets built w/clang 15 from the bionic repo.

The crash analysis task succeeds in symbolizing stack traces. This appears to be an issue with our DWARF parsing libraries used for source coverage.

The default DWARF version emitted in clang when using -g (on Linux) was increased to v5 starting with LLVM 14, so this should also repro (not yet tested). The linked release notes note how to emit DWARF 4 as a workaround: -gdwarf-4 or -fdebug-default-version=4. This is verified to fix OneFuzz coverage analysis.

AB#35929

@ranweiler ranweiler added the bug Something isn't working label Apr 12, 2022
@ghost ghost added the Needs: triage label Apr 12, 2022
@ranweiler ranweiler self-assigned this May 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants