Skip to content

[SanitizerCoverage] -fsanitize-coverage-allowlist removes all coverage (clang 18.1.7 Linux prebuilt) #172402

@0xLucifer

Description

@0xLucifer

Bug Report (LLVM)

Title: [SanitizerCoverage] -fsanitize-coverage-allowlist removes all coverage (clang 18.1.7 Linux prebuilt)

Env

Repro

// t.c
int main() { return 0; }
# allow.txt
src:.*t\.c
./llvm-18.1.7/bin/clang -fsanitize-coverage=trace-pc-guard -fsanitize-coverage-allowlist=allow.txt t.c -o t
gdb --nx --batch --eval-command="disassemble main" ./t | grep trace_pc_guard

Expected: main contains calls to __sanitizer_cov_trace_pc_guard.

Actual: No coverage calls. If the allowlist flag is removed, coverage appears.

Metadata

Metadata

Assignees

No one assigned

    Labels

    clangClang issues not falling into any other category

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions