You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been experiencing a complete system freeze when I compile the following code:
macro_rules! test_macro {
() => {{
use std::env;
let e = env::var("_")
}}
}
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
test_macro!();
}
}
Note the missing semicolon at the end of the assignment statement. I have been reliably able to reproduce this issue on Ubuntu 14.04.x and 16.04. The issue doesn't seem to be caused by OOM conditions as the freeze is instantaneous and no heavy swapping occurs (swap is enabled), but I may be mistaken.
Rust version: 1.9
Arch: x86_64
The text was updated successfully, but these errors were encountered:
> ~/.cargo/bin/rustup run stable rustc test.rs --test
test.rs:5:5: 5:6 error: expected one of `.`, `;`, or an operator, found `}`
test.rs:5 }}
^
fatal runtime error: out of memory
> ~/.cargo/bin/rustup run nightly rustc test.rs --test
test.rs:5:5: 5:6 error: expected one of `.`, `;`, `?`, or an operator, found `}`
test.rs:5 }}
^
fatal runtime error: out of memory
EDIT: non-swap system here. In my experience its exactly the swap which is the primary cause of weird system freezes as the OS is working hard on shuffling memory around.
nrc
added
the
A-macros
Area: All kinds of macros (custom derive, macro_rules!, proc macros, ..)
label
Jun 29, 2016
I've been experiencing a complete system freeze when I compile the following code:
Note the missing semicolon at the end of the assignment statement. I have been reliably able to reproduce this issue on Ubuntu 14.04.x and 16.04. The issue doesn't seem to be caused by OOM conditions as the freeze is instantaneous and no heavy swapping occurs (swap is enabled), but I may be mistaken.
Rust version: 1.9
Arch: x86_64
The text was updated successfully, but these errors were encountered: