Closed
Description
I am using -Zprofile
to use gcov. However, the results are corrupted.
Here are my info.
$ cargo -V
cargo 1.26.0-nightly (008c36908 2018-04-13)
$ rustc -V
rustc 1.27.0-nightly (ac3c2288f 2018-04-18)
Reproduce the issue:
$ cargo new hello_world --bin
$ cargo rustc --bins -- -Zprofile -Copt-level=1 -Clink-dead-code -Ccodegen-units=1 -Zno-landing-pads
$ ./target/debug/hello_world
./target/debug/hello_world
Hello, world!
profiling: /hello_world/target/debug/deps/hello_world-b633c1f029999720.gcda: cannot merge previous GCDA file: corrupt arc tag (0x66353136)
profiling: /hello_world/target/debug/deps/hello_world-b633c1f029999720.gcda: cannot merge previous run count: corrupt object tag (0x37633437)
profiling: /hello_world/target/debug/deps/hello_world-b633c1f029999720.gcda: cannot merge previous GCDA file: corrupt arc tag (0x66353136)
profiling: /hello_world/target/debug/deps/hello_world-b633c1f029999720.gcda: cannot merge previous GCDA file: corrupt arc tag (0x63626564)
profiling: /hello_world/target/debug/deps/hello_world-b633c1f029999720.gcda: cannot merge previous run count: corrupt object tag (0x00456238)
profiling: /hello_world/target/debug/deps/hello_world-b633c1f029999720.gcda: cannot merge previous GCDA file: corrupt arc tag (0x38327472)
profiling: /hello_world/target/debug/deps/hello_world-b633c1f029999720.gcda: cannot merge previous GCDA file: corrupt arc tag (0x00000000)
profiling: /hello_world/target/debug/deps/hello_world-b633c1f029999720.gcda: cannot merge previous run count: corrupt object tag (0xa3000000)
profiling: /hello_world/target/debug/deps/hello_world-b633c1f029999720.gcda: cannot merge previous GCDA file: corrupt arc tag (0x246e6f69)
profiling: /hello_world/target/debug/deps/hello_world-b633c1f029999720.gcda: cannot merge previous run count: corrupt object tag (0x36245447)
profiling: /hello_world/target/debug/deps/hello_world-b633c1f029999720.gcda: cannot merge previous GCDA file: corrupt arc tag (0x36626331)
profiling: /hello_world/target/debug/deps/hello_world-b633c1f029999720.gcda: cannot merge previous run count: corrupt object tag (0x00004530)
It works when using older version:
$ rustup override set nightly-2017-06-28
I don't know if this issue related with kennytm/cov#18
Also: ping #42524