Closed
Description
Compiling this invalid macro code with rustc causes all system memory to be used up until the process is killed.
macro_rules! test_macro {
( $( $t:ty ),* $(),*) => {
enum SomeEnum {
$( $t, )*
};
};
}
fn main() {
test_macro!(String,);
}
I expected rustc to display an error message and return immediately. Instead, an error message is reported and then rustc hangs and eats up all available system memory.
I tried both stable and nightly:
- stable-x86_64-unknown-linux-gnu - rustc 1.12.0 (3191fba 2016-09-23)
- nightly-x86_64-unknown-linux-gnu - rustc 1.14.0-nightly (a3bc191 2016-10-10)
I think this might be related to #33136.
Metadata
Metadata
Assignees
Labels
No labels