Skip to content

Error building TcpListener example from docs with -g flag #20152

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
brianloveswords opened this issue Dec 23, 2014 · 1 comment
Closed

Error building TcpListener example from docs with -g flag #20152

brianloveswords opened this issue Dec 23, 2014 · 1 comment

Comments

@brianloveswords
Copy link
Contributor

I'm trying to compile the TcpListener example from the docs with rustc -g (via cargo build) and I'm getting this error:

src/main.rs:15:9: 15:15 error: internal compiler error: debuginfo::create_for_loop_var_metadata() - Referenced variable location is not an alloca!
src/main.rs:15     for stream in acceptor.incoming() {
                       ^~~~~~
note: the compiler unexpectedly panicked. 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
thread 'rustc' panicked at 'Box<Any>', /Users/rustbuild/src/rust-buildbot/slave/nightly-mac/build/src/libsyntax/diagnostic.rs:123

stack backtrace:
   1:        0x1136332f8 - sys::backtrace::write::he7909da9eb6468e9fBt
   2:        0x113653c03 - failure::on_fail::hb7ba51d37f883f003Qz
   3:        0x1135bfcfa - rt::unwind::begin_unwind_inner::hf4af2222e6b64258uyz
   4:        0x1114c4d97 - rt::unwind::begin_unwind::h8565474196370893881
   5:        0x1114c4d30 - rt::unwind::begin_unwind::h8565474196370893881
   6:        0x11093a52d - session::Session::span_bug::hf51aebfd6f9bd43e1on
   7:        0x1100e8904 - middle::pat_util::pat_bindings::closure.49095
   8:        0x11148fcd1 - ast_util::walk_pat::h8ae3b0f1f213c350lxC
   9:        0x11001da90 - trans::expr::trans_rvalue_stmt_unadjusted::hd7e98e6041ff86d1l4i
  10:        0x10ffd5835 - trans::expr::trans_into::h24b0113a1e4ebf0euGh
  11:        0x10ffd47cb - trans::controlflow::trans_stmt_semi::he012fdd638652fbcgZd
  12:        0x10ffd5e72 - trans::controlflow::trans_block::hc3b3fec5a3fb9ff79Zd
  13:        0x110080234 - trans::base::trans_closure::hd46f470562b1daa76au
  14:        0x10ffca622 - trans::base::trans_fn::hbf7352ab9dfcd879nmu
  15:        0x10ffc5e33 - trans::base::trans_item::hf69d9d491dc08772rHu
  16:        0x110086d38 - trans::base::trans_crate::h82eea2293a06ce55HDv
  17:        0x10fdc950e - driver::phase_4_translate_to_llvm::h3268e7acb055bc171Ca
  18:        0x10fda32d8 - driver::compile_input::ha7c31ba4e10c023avba
  19:        0x10ff1b8e6 - thunk::F.Invoke<A,$u{20}R$GT$::invoke::h2822247860475515909
  20:        0x10ff181e9 - rt::unwind::try::try_fn::h6416506685293600697
  21:        0x1136b9d29 - rust_try_inner
  22:        0x1136b9d16 - rust_try
  23:        0x10ff188e7 - thunk::F.Invoke<A,$u{20}R$GT$::invoke::h15537213600061603954
  24:        0x1136431d4 - sys::thread::thread_start::h3cbfc0fe9ecfb222Kww
  25:     0x7fff9bc942fc - _pthread_body
  26:     0x7fff9bc94279 - _pthread_body

Running rust --version --verbose gives me this:

rustc 0.13.0-nightly (34d680009 2014-12-22 00:12:47 +0000)
binary: rustc
commit-hash: 34d680009205de2302b902d8f9f5f7ae7a042f1a
commit-date: 2014-12-22 00:12:47 +0000
host: x86_64-apple-darwin
release: 0.13.0-nightly

Note that running rustc without the -g flag compiles without issue.

@sfackler
Copy link
Member

Duplicate of #20127.

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

2 participants