Skip to content
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 ICE's when path is a directory #5806

Closed
metajack opened this issue Apr 9, 2013 · 4 comments · Fixed by #11012
Closed

rustc ICE's when path is a directory #5806

metajack opened this issue Apr 9, 2013 · 4 comments · Fixed by #11012
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.

Comments

@metajack
Copy link
Contributor

metajack commented Apr 9, 2013

To replicate:

% mkdir /tmp/iss5806_dir ; \
   echo '#[path = "iss5806_dir"] pub mod iss5806_mod;' > /tmp/iss5806.rs ; \
   echo 'pub fn main() { println("Hello World"); }' >> /tmp/iss5806.rs ; \
   RUST_LOG=rustc=1 rustc  /tmp/iss5806.rs
rust: task failed at 'explicit failure', /Users/fklock/Dev/Mozilla/rust.git/src/libstd/io.rs:928
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /Users/fklock/Dev/Mozilla/rust.git/src/librustc/rustc.rc:398
rust: domain main @0x7fd1c1814210 root task failed

(Original report follows:)

I had code like this:

#[cfg(target_os="macos")]
#[path = "linux"]
pub mod font;

This causes rustc to spin forever. Here's the interesting part of the stack trace:

https://gist.github.com/metajack/5347891

@pnkfelix
Copy link
Member

In my attempt to replicate the bug (on a Mac OS machine), this appears to ICE now rather than hang.

@pnkfelix
Copy link
Member

(The fact that it ICE's now rather than diverges is probably thanks to db1a274 )

@catamorphism
Copy link
Contributor

Reproduced with 2246d56

@alexcrichton
Copy link
Member

This was fixed at some point, the error message is now: error: couldn't read doc: illegal operation on a directory which is exactly what one would expect!

Flagging as needstest.

bors added a commit that referenced this issue Dec 18, 2013
alexcrichton added a commit that referenced this issue Dec 19, 2013
Closes #5806
Closes #5950
Closes #7178
Closes #8259
Closes #8578
Closes #8851
Closes #9129
Closes #10412
flip1995 pushed a commit to flip1995/rust that referenced this issue Jul 17, 2020
Fix deploy script for beta deployment

Since the `beta/` directory already exists, we can't copy the complete `master` dir

changelog: none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants