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 with macro #6596

Closed
emberian opened this issue May 18, 2013 · 5 comments
Closed

ICE with macro #6596

emberian opened this issue May 18, 2013 · 5 comments

Comments

@emberian
Copy link
Member

With:

macro_rules! eofe(
    ($inp:ident) => (
        if $inp.len() != $inp_size {
            return Err(fmt!("invalid file: expected %d bytes in the $inp section \
                            but hit EOF", $inp_size));
            }
    );
)

fn main() {
    eofe!(foo);
}
[15:29:42]/tmp> rustc foo.rs
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
[15:30:00]/tmp> RUST_LOG=::rt::backtrace rustc foo.rs           
rust: task failed at 'No entry found for key: &{repr: 40, ctxt: 0}', /home/cmr/hacking/rust/src/libcore/hashmap.rs:625
/home/cmr/.local/bin/../lib/librustrt.so(+0x1d37d)[0x7fcadbb3037d]
/home/cmr/.local/bin/../lib/librustrt.so(+0x1e019)[0x7fcadbb31019]
/home/cmr/.local/bin/../lib/librustrt.so(+0x2d501)[0x7fcadbb40501]
/home/cmr/.local/bin/../lib/librustrt.so(_ZN9rust_task15call_on_c_stackEPvS0_+0xbf)[0x7fcadbb31e5f]
/home/cmr/.local/bin/../lib/librustrt.so(upcall_fail+0x9f)[0x7fcadbb3268f]
/home/cmr/.local/bin/../lib/libcore-c3ca5d77d81b46c1-0.7-pre.so(_ZN3sys13begin_unwind_16_615cb041c655a976_07preE+0x63)[0x7fcadb471da3]
/home/cmr/.local/bin/../lib/libcore-c3ca5d77d81b46c1-0.7-pre.so(+0x125d32)[0x7fcadb471d32]
/home/cmr/.local/bin/../lib/libcore-c3ca5d77d81b46c1-0.7-pre.so(_ZN3sys14__extensions__9meth_91519fail_with17_ac9eb45dc42bd6906_07preE+0x6b)[0x7fcadb3b1ccb]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(+0x27884f)[0x7fcada8d284f]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(+0x277ae8)[0x7fcada8d1ae8]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN3ext2tt10transcribe13tt_next_token16_66ff343aeb0bd2d6_07preE+0x1340)[0x7fcada77bab0]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN5parse5lexer14__extensions__10meth_1887210next_token17_f94455847d86b1c66_07preE+0x97)[0x7fcada77a6d7]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN5parse6parser14__extensions__10meth_194364bump17_7969da46cf761e406_07preE+0x139)[0x7fcada7915d9]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(+0x15db69)[0x7fcada7b7b69]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN5parse6parser14__extensions__10meth_1997827parse_dot_or_call_expr_with16_9b61d7df819dc426_07preE+0x2d5)[0x7fcada7b6d15]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN5parse6parser14__extensions__10meth_1997622parse_dot_or_call_expr16_1098f4244fcb9146_07preE+0x6d)[0x7fcada7b69ad]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN5parse6parser14__extensions__10meth_2009617parse_prefix_expr16_1098f4244fcb9146_07preE+0x1b1)[0x7fcada7bb041]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN5parse6parser14__extensions__10meth_2009812parse_binops16_1098f4244fcb9146_07preE+0x44)[0x7fcada7bbbf4]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN5parse6parser14__extensions__10meth_2010617parse_assign_expr16_1098f4244fcb9146_07preE+0x63)[0x7fcada7bca33]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN5parse6parser14__extensions__10meth_2013714parse_expr_res16_3b2e3cf4be964ab6_07preE+0x79)[0x7fcada7be889]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN5parse6parser14__extensions__10meth_1986313parse_if_expr16_1098f4244fcb9146_07preE+0x6f)[0x7fcada7aed7f]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN5parse6parser14__extensions__10meth_1985217parse_bottom_expr16_1098f4244fcb9146_07preE+0x1201)[0x7fcada7aac21]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN5parse6parser14__extensions__10meth_1997622parse_dot_or_call_expr16_1098f4244fcb9146_07preE+0x43)[0x7fcada7b6983]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN5parse6parser14__extensions__10meth_2009617parse_prefix_expr16_1098f4244fcb9146_07preE+0x1b1)[0x7fcada7bb041]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN5parse6parser14__extensions__10meth_2009812parse_binops16_1098f4244fcb9146_07preE+0x44)[0x7fcada7bbbf4]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN5parse6parser14__extensions__10meth_2010617parse_assign_expr16_1098f4244fcb9146_07preE+0x63)[0x7fcada7bca33]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN5parse6parser14__extensions__10meth_2013714parse_expr_res16_3b2e3cf4be964ab6_07preE+0x79)[0x7fcada7be889]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN5parse6parser14__extensions__10meth_2023010parse_stmt17_8e137290feb255f66_07preE+0xdf7)[0x7fcada7c3467]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(+0x28511d)[0x7fcada8df11d]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN3ext6expand11expand_stmt16_adbf282cce4a8846_07preE+0x705)[0x7fcada85a285]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(+0x205780)[0x7fcada85f780]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN4fold14__extensions__10meth_186159fold_stmt17_8fe592c5372d242e6_07preE+0xf1)[0x7fcada775871]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(+0x10639a)[0x7fcada76039a]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(+0x7316c)[0x7fcada6cd16c]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN4fold15noop_fold_block16_450d95967ea8b5b6_07preE+0xd4)[0x7fcada75ffa4]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(+0x118494)[0x7fcada772494]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN3ext6expand12expand_block16_5dd6e41869b3d9a6_07preE+0x2be)[0x7fcada85ba4e]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(+0x205930)[0x7fcada85f930]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN4fold14__extensions__10meth_1861210fold_block17_e4c1af3d8376673a6_07preE+0xe8)[0x7fcada775608]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN4fold25noop_fold_item_underscore17_9eadb22cc86160a96_07preE+0x470)[0x7fcada75c3e0]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN4fold14__extensions__10meth_1860620fold_item_underscore15_c20579a6d0a0f36_07preE+0x86)[0x7fcada775346]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN4fold14noop_fold_item17_af2e9b1199dcfa1a6_07preE+0x16c)[0x7fcada75b4ec]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN3ext6expand11expand_item17_3bee51952c7928306_07preE+0x279)[0x7fcada856c89]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(+0x2055bc)[0x7fcada85f5bc]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN4fold14__extensions__10meth_186009fold_item16_31f373790fae0c66_07preE+0xa9)[0x7fcada774eb9]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(+0x110169)[0x7fcada76a169]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(+0x73610)[0x7fcada6cd610]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN4fold13noop_fold_mod15_5072186056a9726_07preE+0xd7)[0x7fcada769fa7]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN3ext6expand16expand_mod_items17_1e5361c5e15e8a3c6_07preE+0x74)[0x7fcada855f14]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(+0x20546b)[0x7fcada85f46b]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN4fold14__extensions__10meth_186338fold_mod17_607d3adcc2f4a3c06_07preE+0x8c)[0x7fcada7768bc]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN4fold15noop_fold_crate17_22d4cda4a2d758216_07preE+0xba)[0x7fcada759e4a]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(+0x118034)[0x7fcada772034]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN4fold14__extensions__10meth_1858910fold_crate17_9433a53b12f6a4dc6_07preE+0xd3)[0x7fcada774803]
/home/cmr/.local/bin/../lib/libsyntax-84efebcb12c867a2-0.7-pre.so(_ZN3ext6expand12expand_crate15_f0fc7cf7c0c2f76_07preE+0xa1e)[0x7fcada85cb9e]
/home/cmr/.local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(+0xa30f50)[0x7fcada134f50]
/home/cmr/.local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(+0xa30d1d)[0x7fcada134d1d]
/home/cmr/.local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6driver6driver12compile_rest14_b2bbbd99b7f256_07preE+0x254)[0x7fcada12ecc4]
/home/cmr/.local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6driver6driver12compile_upto16_763b25ba9ecf0d36_07preE+0x192)[0x7fcada136142]
/home/cmr/.local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN6driver6driver13compile_input16_de35901cc3a34cb6_07preE+0x107)[0x7fcada1365c7]
/home/cmr/.local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN12run_compiler17_de63a4afa8565e6d6_07preE+0x2bcb)[0x7fcada166b7b]
/home/cmr/.local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(+0xa7585e)[0x7fcada17985e]
/home/cmr/.local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(+0xa7314c)[0x7fcada17714c]
/home/cmr/.local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(+0xa6cb1c)[0x7fcada170b1c]
/home/cmr/.local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(+0xa75b38)[0x7fcada179b38]
/home/cmr/.local/bin/../lib/libcore-c3ca5d77d81b46c1-0.7-pre.so(+0xeece5)[0x7fcadb43ace5]
/home/cmr/.local/bin/../lib/libcore-c3ca5d77d81b46c1-0.7-pre.so(+0x16b538)[0x7fcadb4b7538]
/home/cmr/.local/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x25)[0x7fcadbb306d5]
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug
note: try running with RUST_LOG=rustc=1,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /home/cmr/hacking/rust/src/librustc/rustc.rc:355
/home/cmr/.local/bin/../lib/librustrt.so(+0x1d37d)[0x7fcadbb3037d]
/home/cmr/.local/bin/../lib/librustrt.so(+0x1e019)[0x7fcadbb31019]
/home/cmr/.local/bin/../lib/librustrt.so(+0x2d501)[0x7fcadbb40501]
/home/cmr/.local/bin/../lib/librustrt.so(_ZN9rust_task15call_on_c_stackEPvS0_+0xbf)[0x7fcadbb31e5f]
/home/cmr/.local/bin/../lib/librustrt.so(upcall_fail+0x9f)[0x7fcadbb3268f]
/home/cmr/.local/bin/../lib/libcore-c3ca5d77d81b46c1-0.7-pre.so(_ZN3sys13begin_unwind_16_615cb041c655a976_07preE+0x63)[0x7fcadb471da3]
/home/cmr/.local/bin/../lib/libcore-c3ca5d77d81b46c1-0.7-pre.so(+0x125e52)[0x7fcadb471e52]
/home/cmr/.local/bin/../lib/libcore-c3ca5d77d81b46c1-0.7-pre.so(+0x64124)[0x7fcadb3b0124]
/home/cmr/.local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN7monitor17_fd3a6455962a2d396_07preE+0x2415)[0x7fcada16a175]
/home/cmr/.local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(+0xa75b38)[0x7fcada179b38]
/home/cmr/.local/bin/../lib/librustc-c84825241471686d-0.7-pre.so(_ZN4main15_c4de63b748e03d6_07preE+0x69)[0x7fcada179799]
rustc(_rust_main+0x2e)[0x400bfe]
/home/cmr/.local/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x25)[0x7fcadbb306d5]
rust: domain main @0xf3cef0 root task failed
@emberian
Copy link
Member Author

(I'm pretty sure that macro is invalid, too)

@emberian
Copy link
Member Author

It seems to be triggered by any $foo where foo doesn't exist

@emberian
Copy link
Member Author

@emberian
Copy link
Member Author

Have a fix; testing.

@emberian
Copy link
Member Author

Fixed by #6686

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

1 participant