-
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
Debug assertion failure in hir/mod/map:956 #119593
Comments
cargo expand output: https://gist.github.com/tmandry/c8bd5a6a55bee3aa2e5c875d5779f5ab |
Function being type checked in the first panic: (gist) fn new(bits: u64) -> Result<Self, crate::ParseError> {
let header = Self(bits);
let res: Result<(), crate::ParseError> = (|_h| Ok(()))(&header);
res?;
Ok(header)
} next to unexpanded parts of the macro: (
$name:ident (max_size_bit: $upper_size_bit:literal) ($size_ty:ty) $(($header_ty:expr))? {
$($field_ty:ty, $getter:ident: $start_bit:literal, $end_bit:literal;)*
} => |$header:ident $(: $header_arg_ty:ty)?| $verify:expr
) => {
// [...]
fn new(bits: u64) -> Result<Self, crate::ParseError> {
let header = Self(bits);
$(if header.raw_type() != $header_ty {
return Err(crate::ParseError::WrongType {
context: stringify!($name),
expected: $header_ty,
observed: header.raw_type(),
});
})?
// Run invoker-defined verification and return if it's an error.
let res: Result<(), crate::ParseError> = (|$header $(: $header_arg_ty)?| $verify)(&header);
res?;
Ok(header)
}
// [...]
} |
Do you have info about the invocation of the macro? |
There's one here: trace_header! {
EventHeader (EVENT_RECORD_TYPE) {
u8, event_type: 16, 19;
u8, num_args: 20, 23;
u8, thread_ref: 24, 31;
u16, category_ref: 32, 47;
u16, name_ref: 48, 63;
}
} the corresponding expansion is here: fn new(bits: u64) -> Result<Self, crate::ParseError> {
let header = Self(bits);
if header.raw_type() != EVENT_RECORD_TYPE {
return Err(crate::ParseError::WrongType {
context: "EventHeader",
expected: EVENT_RECORD_TYPE,
observed: header.raw_type(),
});
}
let res: Result<(), crate::ParseError> = (|_h| Ok(()))(&header);
res?;
Ok(header)
} The original one I posted is here, inside some ooey nested macro goodness. Looks like every invocation there leads to the ICE. |
Is that first invocation ( |
@compiler-errors Yeah it is ICEing. In the build log attached to the description there's an ICE in the event module. |
Build Fuchsia tests in CI This would have caught rust-lang/rust-clippy#11952 and rust-lang#119593.
Build Fuchsia tests in CI This would have caught rust-lang/rust-clippy#11952 and rust-lang#119593.
Build Fuchsia tests in CI This would have caught rust-lang/rust-clippy#11952 and rust-lang#119593.
Looks like something changed in either the compiler or Fuchsia, but this doesn't seem to be happening anymore. |
…ark-Simulacrum Bump Fuchsia, build tests, and use 8 core bots - Build Fuchsia on 8 cores instead of 16 - Skip building cranelift for Fuchsia - Bump Fuchsia (includes building tests) This includes a change to the upstream build_fuchsia_from_rust_ci script that builds a minimal set of tests, to improve coverage on this builder. This would have caught rust-lang/rust-clippy#11952 and rust-lang#119593. See prior discussion on rust-lang#119400 about building on 8 cores instead of 16. This PR combines changes from that and rust-lang#119399, plus clean up. r? `@Mark-Simulacrum`
…ark-Simulacrum Bump Fuchsia, build tests, and use 8 core bots - Build Fuchsia on 8 cores instead of 16 - Skip building cranelift for Fuchsia - Bump Fuchsia (includes building tests) This includes a change to the upstream build_fuchsia_from_rust_ci script that builds a minimal set of tests, to improve coverage on this builder. This would have caught rust-lang/rust-clippy#11952 and rust-lang#119593. See prior discussion on rust-lang#119400 about building on 8 cores instead of 16. This PR combines changes from that and rust-lang#119399, plus clean up. r? ``@Mark-Simulacrum``
…ark-Simulacrum Bump Fuchsia, build tests, and use 8 core bots - Build Fuchsia on 8 cores instead of 16 - Skip building cranelift for Fuchsia - Bump Fuchsia (includes building tests) This includes a change to the upstream build_fuchsia_from_rust_ci script that builds a minimal set of tests, to improve coverage on this builder. This would have caught rust-lang/rust-clippy#11952 and rust-lang#119593. See prior discussion on rust-lang#119400 about building on 8 cores instead of 16. This PR combines changes from that and rust-lang#119399, plus clean up. r? ```@Mark-Simulacrum```
…ark-Simulacrum Bump Fuchsia, build tests, and use 8 core bots - Build Fuchsia on 8 cores instead of 16 - Skip building cranelift for Fuchsia - Bump Fuchsia (includes building tests) This includes a change to the upstream build_fuchsia_from_rust_ci script that builds a minimal set of tests, to improve coverage on this builder. This would have caught rust-lang/rust-clippy#11952 and rust-lang#119593. See prior discussion on rust-lang#119400 about building on 8 cores instead of 16. This PR combines changes from that and rust-lang#119399, plus clean up. r? ````@Mark-Simulacrum````
…ark-Simulacrum Bump Fuchsia, build tests, and use 8 core bots - Build Fuchsia on 8 cores instead of 16 - Skip building cranelift for Fuchsia - Bump Fuchsia (includes building tests) This includes a change to the upstream build_fuchsia_from_rust_ci script that builds a minimal set of tests, to improve coverage on this builder. This would have caught rust-lang/rust-clippy#11952 and rust-lang#119593. See prior discussion on rust-lang#119400 about building on 8 cores instead of 16. This PR combines changes from that and rust-lang#119399, plus clean up. r? `````@Mark-Simulacrum`````
…k-Simulacrum Bump Fuchsia, build tests, and use 8 core bots - Build Fuchsia on 8 cores instead of 16 - Skip building cranelift for Fuchsia - Bump Fuchsia (includes building tests) This includes a change to the upstream build_fuchsia_from_rust_ci script that builds a minimal set of tests, to improve coverage on this builder. This would have caught rust-lang/rust-clippy#11952 and rust-lang#119593. See prior discussion on rust-lang#119400 about building on 8 cores instead of 16. This PR combines changes from that and rust-lang#119399, plus clean up. r? `@Mark-Simulacrum`
When building a single target in Fuchsia with debug assertions enabled, there are a bunch of repeated panic messages like this. All of them occur when type-checking the impl item outputted by a macro on this line of code. The failing assertion is this one in
opt_span
:rust/compiler/rustc_middle/src/hir/map/mod.rs
Line 956 in 4c5ce1f
rustc-ice-2024-01-04T22_07_58-3292635.txt
I do not have a minimized reproducer yet.
The text was updated successfully, but these errors were encountered: