LLVM coverage: invalid instrumentation profile data (file header is corrupt)

Hey! I do llvm coverage instrumentation per this guide and rarely llvm-profdata merge fails with

warning: /tmp/coverage/profraw/regress-tests-68178-14449340007835288698_0.profraw: invalid instrumentation profile data (file header is corrupt)
error: no profile can be merged

The guide says "When the program is executed and cleanly terminates LLVM libraries write the final counter values to a file". What is meant by clean shutdown, is std::process::exit called from any place (e.g. signal handler) is enough? Do I understand correctly that a process just killed by signal is not enough? Probably I have some leaking binaries still running when profiles are merged which causes this, I'm checking that, but considering other versions in the meanwhile.

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.