Skip to content

rustc ICE output filename begins with . #11107

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Closed
killerswan opened this issue Dec 22, 2013 · 2 comments
Closed

rustc ICE output filename begins with . #11107

killerswan opened this issue Dec 22, 2013 · 2 comments
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@killerswan
Copy link
Contributor

Updated Report

rustc fails when using a 'hidden' filename. It works for --out-dir if there's a dir with that name.

echo "fn main() {}" | RUST_BACKTRACE=1 rustc -o .demo -

error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://static.rust-lang.org/doc/master/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'called `Option::unwrap()` on a `None` value', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/libstd/option.rs:264
stack backtrace:
   1:     0x7f0587b1d070 - rt::backtrace::imp::write::hfdc2d272fcbbff49ONa::v0.11.pre
   2:     0x7f0587a7ee40 - rt::unwind::begin_unwind_inner::hc4a83ca22996b9e6hoa::v0.11.pre
   3:     0x7f058847af50 - rt::unwind::begin_unwind::hafbbeec4436be539mXp::v0.11.pre
   4:     0x7f0588b94280 - back::link::find_crate_id::hdda477888291117fRG0::v0.11.pre
   5:     0x7f0588ca1380 - driver::driver::compile_input::hb3b1b6881f527060mIe::v0.11.pre
   6:     0x7f0588cc4e10 - run_compiler::hada8259178685215tgm::v0.11.pre
   7:     0x7f0588cdc3d0 - main_args::closure.91899
   8:     0x7f0588cdad00 - monitor::closure.91784
   9:     0x7f0588cd65e0 - task::TaskBuilder::try::closure.91550
  10:     0x7f058aa11210 - task::spawn_opts::closure.7947
  11:     0x7f0587b180a0 - rt::task::Task::run::closure.40058
  12:     0x7f0587b23a30 - rust_try
  13:     0x7f0587b17ee0 - rt::task::Task::run::h82248fdf7867ef25De8::v0.11.pre
  14:     0x7f058aa10fe0 - task::spawn_opts::closure.7920
  15:     0x7f0587b1bbb0 - rt::thread::thread_start::hdecfff820cd9abadoT8::v0.11.pre
  16:       0x3b94807e70 - start_thread
  17:       0x3b93cf4db9 - clone
  18:                0x0 - <unknown>

Original Report

First some info:

meow $ git remote -v
origin  git@github.com:killerswan/meow.git (fetch)
origin  git@github.com:killerswan/meow.git (push)
meow $ 
meow $ git log -1 --oneline
00e82d4 various makefile changes (and also showing an ICE when building src/demo.rs)

Now a working build:

meow $ rustc -o demo_exe --test src/demo.rs

An ICE after just adding a period:

meow $ rustc -o .demo_exe --test src/demo.rs
task 'rustc' failed at 'called `Option::unwrap()` on a `None` value', /Users/kevin/code/rust/src/libstd/option.rs:133
error: internal compiler error: unexpected failure
This message reflects a bug in the Rust compiler. 
We would appreciate a bug report: https://github.com/mozilla/rust/wiki/HOWTO-submit-a-Rust-bug-report
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1 to get further details and report the results to github.com/mozilla/rust/issues
task '<main>' failed at 'explicit failure', /Users/kevin/code/rust/src/librustc/lib.rs:444

Working after changing to crate_id, still using a period:

meow $ git diff
diff --git a/src/demo.rs b/src/demo.rs
index 1854d19..abea46f 100755
--- a/src/demo.rs
+++ b/src/demo.rs
@@ -1,4 +1,4 @@
-#[pkgid="demo#0.1"];
+#[crate_id="demo#0.1"];
 #[crate_type="bin"];

 #[feature(non_ascii_idents)];
meow $ 
meow $ rustc -o .demo_exe --test src/demo.rs
@flaper87 flaper87 changed the title rustc ICE when using pkgid property AND output filename begins with . rustc ICE output filename begins with . Apr 14, 2014
@flaper87 flaper87 added the I-ICE label Apr 14, 2014
@flaper87
Copy link
Contributor

cc #12865 related bug but not exactly the same

@killerswan
Copy link
Contributor Author

Awesome. :)

flip1995 pushed a commit to flip1995/rust that referenced this issue Jul 31, 2023
New lint [`error_impl_error`]

Closes rust-lang#11101

changelog: New lint [`error_impl_error`]
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-mentor Call for participation: This issue has a mentor. Use #t-compiler/help on Zulip for discussion. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

2 participants