Skip to content

Improve diagnostic messaging for llvm-cov errors #122

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

richkadel
Copy link

Cherry-picks llvm@ee88b8d and llvm@126e761

These patches to LLVM were added to help debug occasional errors that cause coverage reporting to fail. Prior to this patch, the only messaging was that the coverage data was malformed. Hopefully the improved messaging will help identify the root cause of these errors, when they arise, so we can make corrections to coverage output from Rust.

If profile data is malformed for any kind of reason, we generate
an error that only reports "malformed instrumentation profile data"
without any further information. This patch extends InstrProfError
class to receive an optional error message argument, so that we can
do better error reporting.

Differential Revision: https://reviews.llvm.org/D108942
This patch fixes some issues introduced in
https://reviews.llvm.org/D108942:

1) Remove the default label to fix the bots that use
-Werror,-Wcovered-switch-default
2) Modify the malformed test to fix the bots that are
built without zlib support
3) Modify some error messages in malformed profiles
@richkadel
Copy link
Author

cc: @gulfemsavrun @tmandry @petrhosek

@nikic nikic merged commit 01c8b65 into rust-lang:rustc/13.0-2021-09-30 Dec 1, 2021
vext01 pushed a commit to vext01/llvm-project that referenced this pull request Mar 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants