-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Thread 'rustc' panicked at 'Stack should be empty: final_buf=FrameData...' #81920
Comments
Assigning |
This issue is unrelated to either of those |
I don't think this is |
ok thanks @Aaron1011 I'll downgrade to p-low @rustbot label +P-low -P-medium |
I found a similar ICE using fuzz-rustc #![x=(y[(;z[);
See also #87793 |
A user in #96818 get's ICE with valid code and I think it's the same underlying problem. macro_rules! values {
($($token:ident($value:literal) $(as $inner:ty)? => $attr:meta,)*) => {
#[derive(Debug)]
pub enum TokenKind {
$(
#[$attr]
$token $($inner)? = $value,
)*
}
};
}
values!(STRING(1) as (String) => cfg(test),); Should this issue be bumped to |
All of the ICEs only occur after an error is emitted. However, I'll start working on a fix |
@Aaron1011 any updates? 🙃 |
…aron1011 Manually cleanup token stream when macro expansion aborts. In case of syntax error in macro expansion, the expansion code can decide to stop processing anything. In that case, the token stream is malformed. This makes downstream users, like derive macros, ICE. In this case, this PR manually cleans up the token stream by closing all currently open delimiters. Fixes rust-lang#96818. Fixes rust-lang#80447. Fixes rust-lang#81920. Fixes rust-lang#91023.
Manually cleanup token stream when macro expansion aborts. In case of syntax error in macro expansion, the expansion code can decide to stop processing anything. In that case, the token stream is malformed. This makes downstream users, like derive macros, ICE. In this case, this PR manually cleans up the token stream by closing all currently open delimiters. Fixes rust-lang/rust#96818. Fixes rust-lang/rust#80447. Fixes rust-lang/rust#81920. Fixes rust-lang/rust#91023.
Manually cleanup token stream when macro expansion aborts. In case of syntax error in macro expansion, the expansion code can decide to stop processing anything. In that case, the token stream is malformed. This makes downstream users, like derive macros, ICE. In this case, this PR manually cleans up the token stream by closing all currently open delimiters. Fixes rust-lang/rust#96818. Fixes rust-lang/rust#80447. Fixes rust-lang/rust#81920. Fixes rust-lang/rust#91023.
When I am studying the related in #81886, I found another ICE. Although I haven't figured out the root cause, I suspect they can be fixed together.
Code
playground
Meta
It can be reproduced by nightly and beta versions.
rustc --version --verbose
:Error output
Backtrace
The text was updated successfully, but these errors were encountered: