Skip to content

rustc stack overflow by "hit an unexpected failure path" #1556

Closed
@lht

Description

@lht
type x = {
  r: u
};
tag u {
  t(x);
}
fn main() {}

Compile the above (faulty) code with RUST_LOG=rustc=0,::rt::backtrace rustc foo.rs gives me this:

rust: task aa2c30 ran out of stack
/opt/apps/rust/bin/../lib/librustrt.so(_ZN9rust_task4failEv+0x25)[0x7fe862bfb7f5]
/opt/apps/rust/bin/../lib/librustrt.so(+0x1ebb5)[0x7fe862bfbbb5]
/opt/apps/rust/bin/../lib/librustrt.so(_ZN9rust_task9new_stackEmPvm+0x3c)[0x7fe862bfbf1c]
/opt/apps/rust/bin/../lib/librustrt.so(upcall_s_new_stack+0x1d)[0x7fe862bfe28d]
/opt/apps/rust/bin/../lib/librustrt.so(+0x32129)[0x7fe862c0f129]
/opt/apps/rust/bin/../lib/librustrt.so(upcall_new_stack+0x42)[0x7fe862bff3c2]
/opt/apps/rust/bin/../lib/libstd-79ca5fac56b63fde-0.1.so(+0xd2a79)[0x7fe8634b7a79]
/opt/apps/rust/bin/../lib/libstd-79ca5fac56b63fde-0.1.so(_ZN3map7chained3get17_53584225ac3372a2E+0x4be)[0x7fe86342fe6e]
/opt/apps/rust/bin/../lib/libstd-79ca5fac56b63fde-0.1.so(_ZN3map7chained8map130634find17_99d086d8959e784dE+0x62)[0x7fe863433462]
/opt/apps/rust/bin/../lib/libstd-79ca5fac56b63fde-0.1.so(+0x8db72)[0x7fe863472b72]
/opt/apps/rust/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6middle2ty12tag_variants17_d9d12d749dec2b12E+0xa5)[0x7fe862dfe045]
/opt/apps/rust/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6middle2ty26type_structurally_contains17_386b82bc6c3f7371E+0x338)[0x7fe862de1f38]
/opt/apps/rust/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6middle2ty26type_structurally_contains17_386b82bc6c3f7371E+0x68d)[0x7fe862de228d]
/opt/apps/rust/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6middle2ty26type_structurally_contains17_386b82bc6c3f7371E+0x4fd)[0x7fe862de20fd]
/opt/apps/rust/bin/../lib/librustc-4171d83aef249987-0.1.so(_ZN6middle2ty26type_structurally_contains17_386b82bc6c3f7371E+0x68d)[0x7fe862de228d]
[...250+ lines more like above...]
error: internal compiler error unexpected failure
note: The compiler hit an unexpected failure path. This is a bug. Try running with RUST_LOG=rustc=0,::rt::backtrace to get further details and report the results to github.com/mozilla/rust/issues
rust: upcall fail 'explicit failure', ../src/comp/driver/rustc.rs:175
/opt/apps/rust/bin/../lib/librustrt.so(_ZN9rust_task4failEv+0x25)[0x7fe862bfb7f5]
/opt/apps/rust/bin/../lib/librustrt.so(+0x32129)[0x7fe862c0f129]
/opt/apps/rust/bin/../lib/librustrt.so(upcall_fail+0x39)[0x7fe862bfed09]
rustc[0x407b1d]
rustc[0x40cfbc]
rustc[0x407d15]
rustc[0x407df2]
/opt/apps/rust/bin/../lib/librustrt.so(task_start_wrapper+0x32)[0x7fe862bfa9d2]
rust: domain main @0xa8dc60 root task failed
rustc --version
rustc prerelease (94cd792 2012-01-18 09:39:19 +0100)
host: x86_64-unknown-linux-gnu

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions