Skip to content

Full system freeze on missing semicolon #34375

Closed
@ghost

Description

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-macrosArea: All kinds of macros (custom derive, macro_rules!, proc macros, ..)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions