Skip to content

recursive 'mod' crashes compiler #7553

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

Closed
rossmurray opened this issue Jul 2, 2013 · 2 comments
Closed

recursive 'mod' crashes compiler #7553

rossmurray opened this issue Jul 2, 2013 · 2 comments

Comments

@rossmurray
Copy link

Importing a module inside of itself will cause the compiler to abort with no helpful message after some lengthy processing.

Example:

ross@ubuntuvm:~/Documents$ cat rec.rs
mod rec;

ross@ubuntuvm:~/Documents$ rustc rec.rs
Aborted (core dumped)

This example gives a different error:

ross@ubuntuvm:~/Documents$ cat rec.rs
#[link(name = "rec",
        vers = "0.0.1",
        uuid = "a7e9aaa2-921d-47f0-ab61-69b562d7ea1b")];

#[comment = "Test Recursive Import"];
#[license = "CC0"];
#[crate_type = "lib"];

mod rec;

pub fn test() {
}
ross@ubuntuvm:~/Documents$ rustc rec.rs
memory_region::malloc> Out of memory allocating 1050652 bytesAborted (core dumped)
@m10e
Copy link

m10e commented Jul 3, 2013

Could this stem from the same bug(s) as #7276 ?

@huonw
Copy link
Member

huonw commented Jul 17, 2013

Fixed by 3c5cfdf.

@huonw huonw closed this as completed Jul 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants