Open wucke13 opened 1 year ago
This is a compiler bug (or limitation). (Also, even exit()
is not handled well by compilers on some platforms: https://github.com/rust-lang/rust/issues/77553)
@taiki-e Thank your for the quick response. A note though: https://github.com/rust-lang/rust/issues/77553 mentions something akin
This bug does not occur on Linux or MacOS.
However, I see this on a Linux machine.
https://github.com/rust-lang/rust/issues/77553 is about std::process::exit()
, your issue is probably about SIGKILL.
std::process::exit()
works on linux and macos, but SIGKILL probably does not work on any platform.
If exit is only used in the main function a quick and dirty way of circumventing this issue is to let main return an std::process::ExitCode
instead.
I have found an option that potentially handles this well (https://github.com/taiki-e/cargo-llvm-cov/pull/280), but something seems to be missing to actually make it work.
I have the following setup:
With this setup, zero coverage is reported. What could be the culprit, and how can I get cargo-llvm-cov to report some coverage out of this setup?
Edit: It turns out I get a sensible coverage report if the process
exit()
s instead of being killed. Is there any way around this?