Skip to content

error: internal compiler error: node_id_to_type: no type for node unknown node (id=3332) #10091

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
zokier opened this issue Oct 26, 2013 · 5 comments
Labels
I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@zokier
Copy link

zokier commented Oct 26, 2013

GDB backtrace:

#0  0x00007ffff1e5fe60 in __cxa_throw () from /usr/lib/libstdc++.so.6
#1  0x00007ffff2ffea2a in rust_begin_unwind (token=839147) at /home/rust/rust/src/rt/rust_builtin.cpp:533
#2  0x00007ffff7612586 in std::rt::task::Unwinder::begin_unwind () at src/libstd/rt/task.rs:477
#3  0x00007ffff75b8925 in std::rt::task::begin_unwind () at src/libstd/rt/task.rs:612
#4  0x00007ffff75b8a33 in fn46407 () at src/libstd/sys.rs:40
#5  0x00007ffff75b7e09 in fn46394 () at src/libstd/c_str.rs:307
#6  0x00007ffff75b7d5b in std::vec::MutableVector$__extensions__::as_mut_buf<u8> () at src/libstd/vec.rs:2017
#7  0x00007ffff75b7b45 in std::c_str::with_c_str<!> () at src/libstd/c_str.rs:307
#8  0x00007ffff75b7939 in std::c_str::ToCStr$__extensions__::with_c_str<!> () at src/libstd/c_str.rs:287
#9  0x00007ffff75b7897 in std::c_str::ToCStr$__extensions__::with_c_str<!> () at src/libstd/c_str.rs:249
#10 0x00007ffff75b89b1 in fn46404 () at src/libstd/sys.rs:40
#11 0x00007ffff75b7e09 in fn46394 () at src/libstd/c_str.rs:307
#12 0x00007ffff75b7d5b in std::vec::MutableVector$__extensions__::as_mut_buf<u8> () at src/libstd/vec.rs:2017
#13 0x00007ffff75b7b45 in std::c_str::with_c_str<!> () at src/libstd/c_str.rs:307
#14 0x00007ffff75b7939 in std::c_str::ToCStr$__extensions__::with_c_str<!> () at src/libstd/c_str.rs:287
#15 0x00007ffff75b7897 in std::c_str::ToCStr$__extensions__::with_c_str<!> () at src/libstd/c_str.rs:249
#16 0x00007ffff7482ecd in std::sys::FailWithCause$__extensions__::fail_with () at src/libstd/sys.rs:40
#17 0x00007ffff64f7348 in syntax::diagnostic::handler$HandlerT::fatal () at src/libsyntax/diagnostic.rs:29
#18 0x00007ffff64f82d9 in syntax::diagnostic::handler$HandlerT::bug () at src/libsyntax/diagnostic.rs:135
#19 0x00007ffff4e8abcb in rustc::driver::session::Session_::bug () at src/librustc/driver/session.rs:256
#20 0x00007ffff4e8cf57 in rustc::middle::ty::node_id_to_type () at src/librustc/middle/ty.rs:2799
#21 0x00007ffff5072738 in rustc::middle::ty::expr_ty () at src/librustc/middle/ty.rs:2960
#22 0x00007ffff583db8b in rustc::middle::const_eval::ConstEvalVisitor::lookup_constness ()
    at src/librustc/middle/const_eval.rs:262
#23 0x00007ffff583bec3 in rustc::middle::const_eval::ConstEvalVisitor::classify ()
    at src/librustc/middle/const_eval.rs:249
#24 0x00007ffff58407a7 in rustc::middle::const_eval::Visitor$ConstEvalVisitor::visit_expr_post ()
    at src/librustc/middle/const_eval.rs:277
#25 0x00007ffff5845404 in visit::walk_expr::hfa295b274c17508aay::v0.9$x2dpre ()
    at src/librustc/middle/const_eval.rs:287
#26 0x00007ffff5842268 in visit::Visitor::visit_expr::h1a24411352624b7ax::v0.9$x2dpre ()
    at src/librustc/middle/const_eval.rs:287
#27 0x00007ffff5845628 in visit::walk_exprs::h1467dd839791d97aaz::v0.9$x2dpre ()
    at src/librustc/middle/const_eval.rs:287
#28 0x00007ffff5843b98 in visit::walk_expr::hfa295b274c17508aay::v0.9$x2dpre ()
    at src/librustc/middle/const_eval.rs:287
#29 0x00007ffff5842268 in visit::Visitor::visit_expr::h1a24411352624b7ax::v0.9$x2dpre ()
    at src/librustc/middle/const_eval.rs:287
#30 0x00007ffff5843db7 in visit::walk_expr::hfa295b274c17508aay::v0.9$x2dpre ()
    at src/librustc/middle/const_eval.rs:287
#31 0x00007ffff5842268 in visit::Visitor::visit_expr::h1a24411352624b7ax::v0.9$x2dpre ()
    at src/librustc/middle/const_eval.rs:287
#32 0x00007ffff5844102 in visit::walk_expr::hfa295b274c17508aay::v0.9$x2dpre ()
    at src/librustc/middle/const_eval.rs:287
#33 0x00007ffff5842268 in visit::Visitor::visit_expr::h1a24411352624b7ax::v0.9$x2dpre ()
    at src/librustc/middle/const_eval.rs:287
#34 0x00007ffff5845f18 in visit::walk_stmt::hee2bec38e02f8aaF::v0.9$x2dpre ()
    at src/librustc/middle/const_eval.rs:287
#35 0x00007ffff5845d52 in visit::Visitor::visit_stmt::hb94918db37abda88aE::v0.9$x2dpre ()
    at src/librustc/middle/const_eval.rs:287
#36 0x00007ffff5845c91 in visit::walk_block::h4984e27ce75811daD::v0.9$x2dpre ()
    at src/librustc/middle/const_eval.rs:287
#37 0x00007ffff58459fa in visit::Visitor::visit_block::h7e3e6d1942d24c33aC::v0.9$x2dpre ()
    at src/librustc/middle/const_eval.rs:287
#38 0x00007ffff5847e10 in visit::walk_fn::h9fa0431031d49545aR::v0.9$x2dpre ()
    at src/librustc/middle/const_eval.rs:287
#39 0x00007ffff5847bff in visit::Visitor::visit_fn::h93d4aa2ed2db35aeaQ::v0.9$x2dpre ()
    at src/librustc/middle/const_eval.rs:287
#40 0x00007ffff5848f5b in visit::walk_method_helper::hfc8bf51419c0129aa4::v0.9$x2dpre ()
    at src/librustc/middle/const_eval.rs:287
#41 0x00007ffff5841e9c in visit::walk_item::hda6dd8554fcbf892av::v0.9$x2dpre ()
    at src/librustc/middle/const_eval.rs:287
#42 0x00007ffff5841212 in visit::Visitor::visit_item::h7ca8716289d5d081au::v0.9$x2dpre ()
    at src/librustc/middle/const_eval.rs:287
#43 0x00007ffff58410ba in visit::walk_mod::h31802ca0457d14bar::v0.9$x2dpre ()
    at src/librustc/middle/const_eval.rs:287
#44 0x00007ffff5840de1 in visit::Visitor::visit_mod::h1a5c2e2e645974aq::v0.9$x2dpre ()
    at src/librustc/middle/const_eval.rs:287
#45 0x00007ffff5840d52 in visit::walk_crate::h57a183286ea062b4ap::v0.9$x2dpre ()
    at src/librustc/middle/const_eval.rs:287
#46 0x00007ffff58408bc in rustc::middle::const_eval::process_crate () at src/librustc/middle/const_eval.rs:287
#47 0x00007ffff5bc28f7 in fn104129 () at src/librustc/driver/driver.rs:262
#48 0x00007ffff564f30d in rustc::util::common::time<(),()> () at src/librustc/util/common.rs:21
#49 0x00007ffff5bc0372 in rustc::driver::driver::phase_3_run_analysis_passes ()
    at src/librustc/driver/driver.rs:262
#50 0x00007ffff5bc629c in rustc::driver::driver::compile_input () at src/librustc/driver/driver.rs:442
#51 0x00007ffff5c106b4 in rustc::run_compiler () at src/librustc/rustc.rs:288
#52 0x00007ffff5c44805 in fn108099 () at src/librustc/rustc.rs:408
#53 0x00007ffff5c40c67 in fn108021 () at src/librustc/rustc.rs:367
#54 0x00007ffff5c38eca in task::TaskBuilder::try::anon::expr_fn::_7naSaB () at src/librustc/rustc.rs:349
#55 0x00007ffff752bb97 in fn42662 () at src/libstd/task/spawn.rs:587
#56 0x00007ffff7611f2f in fn49538 () at src/libstd/rt/task.rs:412
#57 0x00007ffff74cb51c in std::unstable::finally::Finally$__extensions__::finally ()
    at src/libstd/unstable/finally.rs:53
#58 0x00007ffff760ed73 in fn49466 () at src/libstd/rt/task.rs:275
#59 0x00007ffff761245d in std::rt::task::Unwinder::try::try_fn () at src/libstd/rt/task.rs:460
#60 0x00007ffff76123c7 in rt::task::Unwinder::try::try_fn::h917a6157155e2cnCaR::v0.9$x2dpre ()
    at src/libstd/rt/task.rs:460
#61 0x00007ffff2ffe9a4 in rust_try (f=<optimized out>, fptr=<optimized out>, env=<optimized out>)
    at /home/rust/rust/src/rt/rust_builtin.cpp:523
#62 0x00007ffff760ec2c in std::rt::task::Unwinder::try () at src/libstd/rt/task.rs:449
#63 0x00007ffff760eade in std::rt::task::Task::run () at src/libstd/rt/task.rs:275
#64 0x00007ffff7611bab in fn49531 () at src/libstd/rt/task.rs:412
#65 0x00007ffff76f2b4d in std::rt::context::Context::new::task_start_wrapper () at src/libstd/rt/context.rs:52
#66 0x00007ffff76f2af7 in rt::context::Context::new::task_start_wrapper::h1b9fdc38dc3bcfa4eta0::v0.9$x2dpre ()
    at src/libstd/rt/context.rs:52
#67 0x0000000000000000 in ?? ()

rustc version: rustc 0.9-pre (950add4 2013-10-26 02:16:08 -0700)

Host OS: Arch Linux x86_64

Sorry for no isolated test case, error appears when compiling a 500ish line source file and I have no idea what is triggering the issue.

@huonw
Copy link
Member

huonw commented Oct 26, 2013

A (link to a) non-isolated test-case is better than no test at all.

However, based on the backtrace, it looks like it might be a problem with either a static or the expression in a [ , .. <expression>].

@zokier
Copy link
Author

zokier commented Oct 27, 2013

Oh, right. Here is the code I'm working on:

https://gist.github.com/zokier/7179787

requires gl-rs and glfw-rs

@zokier
Copy link
Author

zokier commented Oct 27, 2013

Possible duplicate? #9942

@JarrettBillingsley
Copy link

I'm getting something very similar. I can't really reduce the test case though, because it seems totally arbitrary what does and doesn't trigger it, and commenting out too much stuff "fixes" it. I'm also doing stuff that uses gl-rs and glfw-rs... I get a very similar traceback, inside lookup_constness and everything. The actual traceback points to a failure in a line that looks like

else if window.get_key(glfw::KeyW) == glfw::Press

Specifically the glfw::KeyW. The weird thing is, normally this line gives the compiler no problems, and commenting out random things can make it compile fine. But what I did find is that it seems to be triggered at least in part by the presence of static declarations in my module. I don't cast the statics like in #9942, but removing the statics (and replacing their uses with the values they're defined as) makes the problem disappear.

Edit: I may as well throw the code up: https://gist.github.com/JarrettBillingsley/7983334 it's one of the lines on 601, 603, or 605 that it barfs on, I can't really tell (my libsyntax wasn't built with debug info).

@alexcrichton
Copy link
Member

Closing, gl-rs and glfw-rs are a moving target, and the code example is largely outdated. We have tools to help reduce code samples now, but I think that these may be beyond saving.

flip1995 pushed a commit to flip1995/rust that referenced this issue Dec 29, 2022
fix manual_filter false positive

fixes rust-lang#10088
fixes rust-lang#9766

changelog: FP: [`manual_filter`]: Now ignores if expressions where the else branch has side effects or doesn't return `None`
[rust-lang#10091](rust-lang/rust-clippy#10091)
<!-- changelog_checked -->
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

4 participants