-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
ICE: glacier fixed/71348.rs with -Zinstrument-coverage: symbol_names: unsupported constant of type #79565
Comments
@rustbot label: +A-code-coverage +requires-nightly |
…2.0, r=tmandry Fixes reported bugs in Rust Coverage Fixes: rust-lang#79569 Fixes: rust-lang#79566 Fixes: rust-lang#79565 For the first issue (rust-lang#79569), I got hit a `debug_assert!()` before encountering the reported error message (because I have `debug = true` enabled in my config.toml). The assertion showed me that some `SwitchInt`s can have more than one target pointing to the same `BasicBlock`. I had thought that was invalid, but since it seems to be possible, I'm allowing this now. I added a new test for this. ---- In the last two cases above, both tests (intentionally) fail to compile, but the `InstrumentCoverage` pass is invoked anyway. The MIR starts with an `Unreachable` `BasicBlock`, which I hadn't encountered before. (I had assumed the `InstrumentCoverage` pass would only be invoked with MIRs from successful compilations.) I don't have test infrastructure set up to test coverage on files that fail to compile, so I didn't add a new test. r? `@tmandry` FYI: `@wesleywiser`
Can someone please reopen this? the issue is still reproducible:
|
This comment has been minimized.
This comment has been minimized.
My mistake for marking this This gives the following result, and successfully compiles: $ rustc fixed/72348.rs -Zinstrument-coverage -Zsymbol-mangling-version=legacy
warning: -Z instrument-coverage requires symbol mangling version `v0`, but `-Z symbol-mangling-version=legacy` was specified Legacy symbol mangling is not expected to work correctly when generating coverage reports, but at least this option shows the ICE is coming from the Yes, something in the @eddyb - Any thoughts/suggestions? |
cc: @wesleywiser @tmandry |
Agreed with @richkadel. This looks to be a result of using a number of incomplete/unstable features in combination, and not really coverage related. |
smaller example from glacier/fixed/74255.rs #![feature(const_generics)]
#![allow(dead_code, incomplete_features)]
#[derive(PartialEq, Eq)]
enum IceEnum {
Variant,
}
struct IceStruct;
impl IceStruct {
fn ice_struct_fn<const I: IceEnum>() {}
}
fn ice_fn() {
IceStruct::ice_struct_fn::<{ IceEnum::Variant }>();
}
fn main() {} |
#83234 makes it possible to fix this |
No longer ICEs since #87194 |
The regression tests mentioned above appear to already exist in the codebase? |
The existing test cases should be sufficient. The instrumentation coverage was affected because it defaults to v0 mangling scheme. |
Code
file is from glacier
fixed/71348.rs
Meta
rustc --version --verbose
:Error output
rustc -Zinstrument-coverage ./71348.rs
Backtrace
The text was updated successfully, but these errors were encountered: