-
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
rustc stack overflow with self-recursive concat! macro #84632
Comments
Note that the crash also occurs without Based on testing with Godbolt, this doesn't seem to be a regression, or at least not a recent one. |
Issue might be in this line:
Calls rust/compiler/rustc_expand/src/base.rs Line 1191 in ba6275b
And sets rust/compiler/rustc_expand/src/expand.rs Line 427 in ba6275b
|
This comment has been minimized.
This comment has been minimized.
Bug is confusing to track down, so I am no longer working on this. For people who are interested, here is the log when the loop is encountered:
@rustbot release-assignment |
The issue is part of a bigger problem, that #![recursion_limit = "5"]
macro_rules! a {
() => ("");
(A) => (concat!("", a!()));
(A, $($A:ident),*) => (concat!("", a!($($A),*)))
}
fn main() {
a! (A, A, A, A, A, A, A, A, A, A);
} |
Seems to be a regression between I suspect this commit from blame caused the regression, but I'm not sure. @rustbot label regression-untriaged |
…r=petrochenkov Do not set depth to 0 in fully_expand_fragment Fixes rust-lang#84632.
I tried this code:
I expected to see this happen: An error message about exceeding some recursion limit
Instead, this happened:
Meta
Tested on stable 1.51.0 +
1.53.0-nightly (2021-04-26 9684258936dabda2ba49)
The text was updated successfully, but these errors were encountered: