Closed xd009642 closed 3 years ago
This this is a known bug with link-dead-code implementation on msvc, not instrument-coverage. I implemented a different way to support dead code coverage (enabled by default) because I could never figure out why link-dead-code always caused the binary to segfault. The profraw file is empty because the binary segfaults before it has an opportunity to write the file on exit.
Can you do me a favor and retitle this issue to relate it to the link-dead-code option instead?
Duplicate of #76038
Well as it's a duplicate I'll close this one then, thanks :+1:
With the following
RUSTFLAGS=" -C link-dead-code -C debuginfo=2 --cfg=tarpaulin -Z instrument-coverage "
and nightly-x86_64-pc-windows-msvc unchanged - rustc 1.56.0-nightly (492723897 2021-07-29) and this test:unused.rs contains just a single function that's never used:
I expected to see to see it exit fine and the profraw file generated and the test exit successfully. Instead an empty profraw file is generated and the test segfaults. I don't know if this is connected to #77553 @richkadel