Crash in llvm-cov for rust with async code and --branch option
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Minimal reproduction: https://github.com/mscharley/llvm-cov-crash (see `repro.sh`)
* `rustc 1.96.0-nightly (fda6d37bb 2026-03-27)`
* `cargo-llvm-cov 0.8.3`
Example output:
```
❯ ./repro.sh
warning: --branch option is unstable
info: cargo-llvm-cov currently setting cfg(coverage) and cfg(coverage_nightly); you can opt-out it by passing --no-cfg-coverage and --no-cfg-coverage-nightly
Compiling llvm-cov-crash v0.1.0 (/home/matt/Code/mscharley/llvm-cov-crash)
Finished `test` profile [unoptimized + debuginfo] target(s) in 0.11s
Running unittests src/lib.rs (target/llvm-cov-target/debug/deps/llvm_cov_crash-2e699cd78d79bb02)
running 1 test
test tests::test ... ok
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace and instructions to reproduce the bug.
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):
0 libLLVM.so.22.1-rust-1.96.0-nightly 0x00007f26b8956587 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) + 39
1 libLLVM.so.22.1-rust-1.96.0-nightly 0x00007f26b8956e7d
2 libc.so.6 0x00007f26b2642790
3 libLLVM.so.22.1-rust-1.96.0-nightly 0x00007f26bac6f31f llvm::coverage::CoverageMapping::getInstantiationGroups(llvm::StringRef) const + 319
4 llvm-cov 0x0000562792c83728
5 llvm-cov 0x0000562792c874ff
6 llvm-cov 0x0000562792c724f3
7 llvm-cov 0x0000562792c72451
8 libc.so.6 0x00007f26b26a346c
9 libc.so.6 0x00007f26b26a34f1 pthread_once + 33
10 llvm-cov 0x0000562792c72414
11 llvm-cov 0x0000562792c72371
12 llvm-cov 0x0000562792c7281a
13 llvm-cov 0x0000562792c7294d
14 libLLVM.so.22.1-rust-1.96.0-nightly 0x00007f26b8919823 llvm::StdThreadPool::processTasks(llvm::ThreadPoolTaskGroup*) + 595
15 libLLVM.so.22.1-rust-1.96.0-nightly 0x00007f26b891a989
16 libc.so.6 0x00007f26b269dd53
17 libc.so.6 0x00007f26b272563c
error: failed to generate report: process didn't exit successfully: `/nix/store/rl91pdv5w2a05nhpsb3wp9ca7qf2b25m-rust-default-1.96.0-nightly-2026-03-28/lib/rustlib/x86_64-unknown-linux-gnu/bin/llvm-cov report -instr-profile=/home/matt/Code/mscharley/llvm-cov-crash/target/llvm-cov-target/llvm-cov-crash.profdata -object target/llvm-cov-target/debug/deps/llvm_cov_crash-2e699cd78d79bb02 -ignore-filename-regex '/rustc/([0-9a-f]+|[0-9]+\.[0-9]+\.[0-9]+)/|^/home/matt/Code/mscharley/llvm\-cov\-crash(/.*)?/(tests|examples|benches)/|^/home/matt/Code/mscharley/llvm\-cov\-crash(/.*)?/(tests\.rs|[0-9a-zA-Z_-]+[_-]tests\.rs)$|^/home/matt/Code/mscharley/llvm\-cov\-crash/target/llvm\-cov\-target($|/)|^/home/matt/\.local/share/cargo/(registry|git)/|^/home/matt/\.local/share/rustup/toolchains($|/)'` (signal: 11 (SIGSEGV) (core dumped))
```
Contributor guide
Assessment
This issue has not been assessed yet.