-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
llvm-cov: Instantiation groups are printed in non-deterministic order #62508
Comments
It seems that the instantiations do get sorted for display: llvm-project/llvm/tools/llvm-cov/SourceCoverageView.cpp Lines 197 to 201 in e46aa7f
But this sort only compares their (last) line number so that they display after the correct line, and does not compare the function name for instantiations with the same line: llvm-project/llvm/tools/llvm-cov/SourceCoverageView.h Lines 64 to 67 in e46aa7f
|
Here's an example of Rust's instrument-coverage tests accidentally being broken, due to a bug in the regex used to ignore instantiation names: rust-lang/rust#110942 |
Another potential explanation is that |
When
llvm-cov show
shows instantiation groups, it seems to print them in a non-deterministic order (presumably influenced by hash bucket order).This is a hassle for Rust's
-Cinstrument-coverage
tests, since they have to jump through hoops to ignore instantiation names when comparing output snapshots.Ideally the instantiations should at least be naïvely sorted by their function name. That would at least be deterministic in the common case where all instantiations have distinct names.
The text was updated successfully, but these errors were encountered: