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

OSX only ICE using plugin_register #16856

Closed
jasonroelofs opened this issue Aug 29, 2014 · 4 comments
Closed

OSX only ICE using plugin_register #16856

jasonroelofs opened this issue Aug 29, 2014 · 4 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@jasonroelofs
Copy link

I ran into this issue trying to build the https://github.com/bjz/gl-rs project. I was able to pair the code down to a minimal required set that triggers this ICE. As the minimal is multiple files I've prepared a repository such that it's easy to test this in three steps.

[repo deleted]

What's particularly strange is that this only throws on OSX. My linux machine has no problem, and multiple people in #rust_gamedev are on Windows and use gl-rs regularly with no issue.

Here's the stack:

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 'index out of bounds: the len is 56 but the index is 60', /private/tmp/rust-g7z3JE/src/libsyntax/lib.rs:1

stack backtrace:
   1:        0x10fbb5335 - rt::backtrace::imp::write::h6b086cc6e4a0277ai9q
   2:        0x10fbb86b3 - failure::on_fail::h0f81c721549aaa0ebqr
   3:        0x10fe78923 - unwind::begin_unwind_inner::h9ccd054f5e442a0e4fe
   4:        0x10fe78575 - unwind::begin_unwind_fmt::h167e44acc4103cb6ude
   5:        0x10fe783a2 - rust_begin_unwind
   6:        0x10fec427c - failure::begin_unwind::h551715f98d5a21280zk
   7:        0x10fec9556 - failure::fail_bounds_check::hb244088457424e6bcyk
   8:        0x1163efaa2 - util::interner::StrInterner::get::h48e2b49ca7acec9cZpa
   9:        0x116404698 - ast::Name::as_str::h6f78683b28420a41mPb
  10:        0x1164a92e0 - parse::parser::Parser<'a>::lit_from_token::h3595dc6e621d333dx7L
  11:        0x1164adb1c - parse::parser::Parser<'a>::parse_lit::h63be68bced529bcfB9L
  12:        0x1164b14a3 - parse::parser::Parser<'a>::parse_bottom_expr::hb4689d131d8b82157qM
  13:        0x1164b6897 - parse::parser::Parser<'a>::parse_dot_or_call_expr::h262b4643f2c2da19LJM
  14:        0x1164b9a48 - parse::parser::Parser<'a>::parse_prefix_expr::h9cf53632dffcd8bfF1M
  15:        0x1164b9e77 - parse::parser::Parser<'a>::parse_binops::h4e521c814541f283R6M
  16:        0x1164ba79d - parse::parser::Parser<'a>::parse_assign_expr::h8d9d914e489932f8kaN
  17:        0x116517b0b - ext::base::get_exprs_from_tts::h45f2b069f289dc64yT3
  18:        0x1103459fa - macro_handler::h7551bfd811b168bdYba
  19:        0x10f36ddda - ext::base::BasicMacroExpander.TTMacroExpander::expand::h2baf24ba9a7d5ce5ao3
  20:        0x10f3f6829 - ext::expand::expand_item_mac::ha663cdd153576148xda
  21:        0x10f3f3ef8 - ext::expand::expand_item::hba41efe93fdcafe8e59
  22:        0x10f3fb773 - ext::expand::MacroExpander<'a, 'b>.Folder::fold_item::h13f1007332cccf23wRa
  23:        0x10f3fb70c - fold::noop_fold_mod::closure.51796
  24:        0x10f39eadb - iter::Iterator::collect::h11959690785247035432
  25:        0x10f3fae1c - fold::Folder::fold_mod::h15293868271147069927
  26:        0x10f42af87 - ext::expand::expand_crate::h1c4f9fc1f596a1bcpUa
  27:        0x10d31400c - driver::driver::phase_2_configure_and_expand::closure.134908
  28:        0x10d13d8c1 - driver::driver::phase_2_configure_and_expand::h75de81d8bf8c4cb1piy
  29:        0x10d2daec2 - driver::driver::compile_input::h10872f44b013a593Qby
  30:        0x10d366567 - driver::run_compiler::h8e876bac459a8495JIB
  31:        0x10d364ca6 - driver::main_args::closure.138220
  32:        0x10d37655b - task::TaskBuilder<S>::try_future::closure.139333
  33:        0x10d376463 - task::TaskBuilder<S>::spawn_internal::closure.139310
  34:        0x10ca5e6fc - task::spawn_opts::closure.8457
  35:        0x10feda80c - rust_try_inner
  36:        0x10feda7f6 - rust_try
  37:        0x10fe75d77 - unwind::try::h9ff6d49cd7168a36k4d
  38:        0x10fe75b3b - task::Task::run::h364d323a1b0e9c2bbbd
  39:        0x10ca5e542 - task::spawn_opts::closure.8402
  40:        0x10fe778b6 - thread::thread_start::hf671dbfd5877000bXzd
  41:     0x7fff96c38899 - _pthread_body
  42:     0x7fff96c3872a - _pthread_struct_init

Could not compile `plugin-ice`.

@alexcrichton
Copy link
Member

What version of the compiler are you using?

Your repository compiles ok for me with rustc 0.12.0-pre-nightly (711d71027 2014-08-22 00:56:00 +0000), but this may have been a recent regression.

@jasonroelofs
Copy link
Author

Just rebuilt yesterday from b516532. I'll try some earlier builds to see if I can pin-point a problem commit.

@jasonroelofs
Copy link
Author

Strange, built from 711d710 to match yours and I still get the ICE. Maybe the way I'm building rust is broken? I use homebrew to brew install rust --HEAD which runs

./configure --prefix=/usr/local/Cellar/rust/HEAD --disable-rpath --enable-clang
make
make install

I cannot use the binary nightlies or build from my own checkout because the installed binaries have bad linking paths (See #16733). I wouldn't be surprised if my machine is doing something wrong but I'm at a loss as to what.

For reference, this is the clang version that's building Rust:

] clang -v
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn)
Target: x86_64-apple-darwin13.3.0
Thread model: posix

@jasonroelofs
Copy link
Author

Alright something is definitely messed up with my machine. I was able build my repo fine on the newest binary nightly no problem on another Mac I've got.

I'll close this and my other one for now, they're definitely my problem. Sorry for the bother.

bors added a commit to rust-lang-ci/rust that referenced this issue Mar 17, 2024
fix: Fix wrong where clause rendering on hover

We were not accounting for proper newline indentation in some places making the hover look weird (or just straight up wrong for type aliases)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

2 participants