| Issue |
172402
|
| Summary |
[SanitizerCoverage] -fsanitize-coverage-allowlist removes all coverage (clang 18.1.7 Linux prebuilt)
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
0xLucifer
|
### Bug Report (LLVM)
**Title**: [SanitizerCoverage] `-fsanitize-coverage-allowlist` removes all coverage (clang 18.1.7 Linux prebuilt)
**Env**
- clang+llvm-18.1.7-x86_64-linux-gnu-ubuntu-18.04.tar.xz (https://github.com/llvm/llvm-project/releases/download/llvmorg-18.1.7/clang+llvm-18.1.7-x86_64-linux-gnu-ubuntu-18.04.tar.xz)
- OS: Ubuntu 22.04.4 LTS
- Target: x86_64-unknown-linux-gnu
**Repro**
```c
// t.c
int main() { return 0; }
```
```
# allow.txt
src:.*t\.c
```
```bash
./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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs