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

ICE when a static is a reference to an extern static #16479

Closed
jackheizer opened this issue Aug 13, 2014 · 2 comments
Closed

ICE when a static is a reference to an extern static #16479

jackheizer opened this issue Aug 13, 2014 · 2 comments
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@jackheizer
Copy link
Contributor

Input

extern "C" {
        static TEST: libc::c_int;
}
static TEST2: &'static libc::c_int = &TEST;

Output

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://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 'expected item, found foreign item TEST::TEST (id=6)', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/ast_map/mod.rs:278

stack backtrace:
   1:        0x10b1f2b55 - rt::backtrace::imp::write::h62d0bebd377f16937iq
   2:        0x10b1f5d13 - failure::on_fail::h5393f2e9d64b17dcCzq
   3:        0x10b4b5ee5 - unwind::begin_unwind_inner::h7c6fecebc6991c8bS5d
   4:        0x10b4b5b1b - unwind::begin_unwind_fmt::h227376fe1e021a36n3d
   5:        0x1091a3e98 - ast_map::Map::expect_item::h442609fa0ea2d4a0ILy
   6:        0x107f6474c - middle::check_const::CheckItemRecursionVisitor<'a>.Visitor<(*>::visit_expr::h3b3433ca38490a98DNl
   7:        0x107f63511 - middle::check_const::CheckItemRecursionVisitor<'a>.Visitor<(*>::visit_item::h509cf80ea9869588IMl
   8:        0x107f5e520 - middle::check_const::check_item::h1ea4be8296e1fec8itl
   9:        0x107f6192f - middle::check_const::check_crate::h3ed5c96f60e762fbTsl
  10:        0x107d25566 - util::common::time::h8826072899363796710
  11:        0x1085b6a9c - driver::driver::phase_3_run_analysis_passes::h5ac71b7cb91eaab7XFw
  12:        0x1085b1a83 - driver::driver::compile_input::h7da196e0639e9204csw
  13:        0x108656437 - driver::run_compiler::hda9adb2662da5f07rWz
  14:        0x108654bb6 - driver::main_args::closure.136131
  15:        0x108666b0b - task::TaskBuilder<S>::try_future::closure.137292
  16:        0x108666a15 - task::TaskBuilder<S>::spawn_internal::closure.137269
  17:        0x107cd178c - task::spawn_opts::closure.8415
  18:        0x10b51b22c - rust_try_inner
  19:        0x10b51b216 - rust_try
  20:        0x10b4b32bb - unwind::try::h5982dbe8fdfe64a5nUd
  21:        0x10b4b305b - task::Task::run::h1c9de674e75b1485v2c
  22:        0x107cd15ea - task::spawn_opts::closure.8360
  23:        0x10b4b4e76 - thread::thread_start::hf75b60e3600e3439Fqd
  24:     0x7fff968ed899 - _pthread_body
  25:     0x7fff968ed72a - _pthread_struct_init

Version

rustc 0.12.0-pre-nightly (e189122e9 2014-08-13 00:41:22 +0000)
@sanxiyn
Copy link
Member

sanxiyn commented Dec 8, 2014

This seems fixed by #18279.

@alexcrichton alexcrichton added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Dec 8, 2014
@ghost ghost self-assigned this Dec 12, 2014
@ghost
Copy link

ghost commented Dec 12, 2014

@sanxiyn Indeed, thanks! We already have a test in this vein so I'm going to close this.

@ghost ghost closed this as completed Dec 12, 2014
matthiaskrgr pushed a commit to matthiaskrgr/rust that referenced this issue Feb 5, 2024
internal: Bump release runners to MacOS 12
This issue was closed.
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. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

3 participants