Closed
Description
Hi there. The following small test case demonstrates the bug (I misused vec::foldr function):
fn main() {
let needlesArr: ~[char] = ~['a', 'f'];
do vec::foldr(needlesArr) |x, y| {
//empty
}
}
The bug message and stacktrace (I rerun it with "RUST_LOG=rustc=0,::rt::backtrace" as it suggested) is below.
The scary "error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug" gripped my attention.
> rustc ~/thrash/bug.rs
/home/varnie/thrash/bug.rs:3:7: 3:31 error: this function takes 3 parameters but 2 parameters were supplied
/home/varnie/thrash/bug.rs:3 do vec::foldr(needlesArr) |x, y| {
^~~~~~~~~~~~~~~~~~~~~~~~
rust: task failed at 'option none', /home/varnie/thrash/rust/src/rustc/rustc.rc:1
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_j+0x72)[0xb5eb43c2]
/usr/local/bin/../lib/librustrt.so(rust_task_fail+0x36)[0xb5eb4466]
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task4failEPKcS1_j+0x32)[0xb5eb44d2]
/usr/local/bin/../lib/librustrt.so(upcall_s_fail+0x53)[0xb5eb6e93]
/usr/local/bin/../lib/librustrt.so(+0x2e693)[0xb5eca693]
/usr/local/bin/../lib/librustrt.so(upcall_fail+0x1be)[0xb5eb817e]
/usr/local/bin/../lib/librustc-73389320c1332876-0.3.so(+0x392536)[0xb6287536]
/usr/local/bin/../lib/librustc-73389320c1332876-0.3.so(+0x39eaa7)[0xb6293aa7]
/usr/local/bin/../lib/librustc-73389320c1332876-0.3.so(+0x39e24a)[0xb629324a]
/usr/local/bin/../lib/librustc-73389320c1332876-0.3.so(+0x5ebc8c)[0xb64e0c8c]
/usr/local/bin/../lib/librustc-73389320c1332876-0.3.so(+0x390063)[0xb6285063]
/usr/local/bin/../lib/librustc-73389320c1332876-0.3.so(+0x5ebc8c)[0xb64e0c8c]
/usr/local/bin/../lib/librustc-73389320c1332876-0.3.so(+0x329537)[0xb621e537]
/usr/local/bin/../lib/librustc-73389320c1332876-0.3.so(+0x3603ba)[0xb62553ba]
/usr/local/bin/../lib/librustc-73389320c1332876-0.3.so(+0x35ed53)[0xb6253d53]
/usr/local/bin/../lib/librustc-73389320c1332876-0.3.so(+0x35cca7)[0xb6251ca7]
/usr/local/bin/../lib/librustc-73389320c1332876-0.3.so(+0x5ebc8c)[0xb64e0c8c]
/usr/local/bin/../lib/libsyntax-b45cc7d0b085bc34-0.3.so(+0x9e687)[0xb6899687]
/usr/local/bin/../lib/libsyntax-b45cc7d0b085bc34-0.3.so(+0x9e4e0)[0xb68994e0]
/usr/local/bin/../lib/librustc-73389320c1332876-0.3.so(_ZN6middle6typeck11check_crate17_2914875f16fe66be3_03E+0x1143)[0xb62f9a23]
/usr/local/bin/../lib/librustc-73389320c1332876-0.3.so(_ZN6driver6driver12compile_upto17_72edd05480e097483_03E+0x1124)[0xb64b7d24]
/usr/local/bin/../lib/librustc-73389320c1332876-0.3.so(+0x5ebc8c)[0xb64e0c8c]
/usr/local/bin/../lib/librustc-73389320c1332876-0.3.so(_ZN6driver6driver13compile_input17_dc2f7342b6a0a3fe3_03E+0xc5)[0xb64bb6b5]
rustc[0x804e5af]
rustc[0x8058f64]
rustc[0x8058c32]
rustc[0x805507b]
rustc[0x805447d]
/usr/local/bin/../lib/libcore-d27e4777a53c3e50-0.3.so(+0x4ccac)[0xb7384cac]
/usr/local/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x31)[0xb5eb5581]
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=0,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: task failed at 'explicit failure', /home/varnie/thrash/rust/src/rustc/driver/rustc.rs:256
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_j+0x72)[0xb5eb43c2]
/usr/local/bin/../lib/librustrt.so(rust_task_fail+0x36)[0xb5eb4466]
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task4failEPKcS1_j+0x32)[0xb5eb44d2]
/usr/local/bin/../lib/librustrt.so(upcall_s_fail+0x53)[0xb5eb6e93]
/usr/local/bin/../lib/librustrt.so(+0x2e693)[0xb5eca693]
/usr/local/bin/../lib/librustrt.so(upcall_fail+0x1be)[0xb5eb817e]
rustc[0x805384d]
rustc[0x8058f64]
rustc[0x8058b3b]
rustc(_rust_main+0x38)[0x8058b88]
/usr/local/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x31)[0xb5eb5581]
rust: domain main @0x901c0b8 root task failed
rust: task failed at 'killed', /home/varnie/thrash/rust/src/libcore/task.rs:523
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_j+0x72)[0xb5eb43c2]
/usr/local/bin/../lib/librustrt.so(rust_task_fail+0x36)[0xb5eb4466]
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task4failEPKcS1_j+0x32)[0xb5eb44d2]
/usr/local/bin/../lib/librustrt.so(upcall_s_fail+0x53)[0xb5eb6e93]
/usr/local/bin/../lib/librustrt.so(+0x2e693)[0xb5eca693]
/usr/local/bin/../lib/librustrt.so(upcall_fail+0x1be)[0xb5eb817e]
/usr/local/bin/../lib/libcore-d27e4777a53c3e50-0.3.so(_ZN4task5yield17_8bfde8cf2fff81633_03E+0xc2)[0xb7372f12]
/usr/local/bin/../lib/libcore-d27e4777a53c3e50-0.3.so(+0x626e5)[0xb739a6e5]
/usr/local/bin/../lib/libcore-d27e4777a53c3e50-0.3.so(_ZN4priv11weaken_task17_2b14e75713b55a573_03E+0xed)[0xb739a57d]
/usr/local/bin/../lib/libcore-d27e4777a53c3e50-0.3.so(+0x62404)[0xb739a404]
/usr/local/bin/../lib/libcore-d27e4777a53c3e50-0.3.so(+0x7d5f8)[0xb73b55f8]
/usr/local/bin/../lib/libcore-d27e4777a53c3e50-0.3.so(+0x614a6)[0xb73994a6]
/usr/local/bin/../lib/libcore-d27e4777a53c3e50-0.3.so(+0x6069d)[0xb739869d]
/usr/local/bin/../lib/libcore-d27e4777a53c3e50-0.3.so(+0x4ccac)[0xb7384cac]
/usr/local/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x31)[0xb5eb5581]
My rustc version and system info:
varnie@heimdal:~/thrash/rust/src/rustc/middle/typeck/check$ rustc -v
rustc 0.3 (6081eb7 2012-07-15 05:41:24 -0700)
host: i686-unknown-linux-gnu
Hope it helps