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

ty::subst failure (mismatching region params) with regioned structs #3447

Closed
stegenish opened this issue Sep 10, 2012 · 8 comments
Closed

ty::subst failure (mismatching region params) with regioned structs #3447

stegenish opened this issue Sep 10, 2012 · 8 comments
Labels
A-type-system Area: Type system I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Milestone

Comments

@stegenish
Copy link

The following code fails to compile with an ice error:

struct list<T> {
    element: &self/T;
    mut next: Option<list<T>>;
}

impl<T> list<T>{
    fn addEnd(&self, element: &self/T) {
        let newList = list {
            element: element,
            next: option::None
        };

        self.next = Some(newList);
    }
}

fn main() {
    let s = @"str";
    let ls: list<@str> = list {
        element: &s,
        next: option::None
    };
    io::println(*ls.element);
}

rust: task b7603a58 ran out of stack
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_j+0x72)[0x801a82]
/usr/local/bin/../lib/librustrt.so(rust_task_fail+0x36)[0x801b26]
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task4failEPKcS1_j+0x32)[0x801b92]
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task4failEv+0x35)[0x801bd5]
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task9new_stackEj+0x2cf)[0x80217f]
/usr/local/bin/../lib/librustrt.so(_Z14new_stack_slowP14new_stack_args+0x26)[0x8021f6]
/usr/local/bin/../lib/librustrt.so(+0x33a03)[0x81ca03]
/usr/local/bin/../lib/librustrt.so(upcall_new_stack+0x274)[0x806c24]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x6b6b97)[0x163eb97]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x2880ec)[0x12100ec]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(_ZN6middle2ty8mk_class16_c1f370aa86b3bd33_04E+0x1b5)[0x115d065]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(_ZN6middle2ty19fold_regions_and_ty17_49583798a8f3b37d3_04E+0x74b)[0x1217c1b]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x291b18)[0x1219b18]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x291e3b)[0x1219e3b]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x29057a)[0x121857a]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x12eafa)[0x10b6afa]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x290520)[0x1218520]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(_ZN6middle2ty19fold_regions_and_ty17_49583798a8f3b37d3_04E+0x1cb)[0x121769b]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x291b18)[0x1219b18]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(_ZN6middle2ty5subst16_adc88f3b4ac52603_04E+0x25d)[0x11095bd]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(_ZN6middle2ty17lookup_field_type16_8a8879ced8a67e23_04E+0x16b)[0x10ca7ab]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x2aca07)[0x1234a07]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x2997b2)[0x12217b2]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299626)[0x1221626]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x299807)[0x1221807]
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/thomas/software/rust/src/rustc/driver/rustc.rs:272
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_j+0x72)[0x801a82]
/usr/local/bin/../lib/librustrt.so(rust_task_fail+0x36)[0x801b26]
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task4failEPKcS1_j+0x32)[0x801b92]
/usr/local/bin/../lib/librustrt.so(upcall_s_fail+0x53)[0x804063]
/usr/local/bin/../lib/librustrt.so(+0x33a03)[0x81ca03]
/usr/local/bin/../lib/librustrt.so(upcall_fail+0x1bc)[0x80477c]
/usr/local/bin/../lib/librustrt.so(rust_upcall_fail+0x2b)[0x8048bb]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(_ZN2rt7rt_fail17_b957bac32f5536163_04E+0x45)[0x92c485]
rustc[0x8054d5c]
rustc[0x805a5d4]
rustc[0x805a18a]
rustc(_rust_main+0x38)[0x805a1d8]
/usr/local/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x31)[0x802371]
rust: domain main @0x8480290 root task failed
rust: task failed at 'killed', /home/thomas/software/rust/src/libcore/task.rs:579
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_j+0x72)[0x801a82]
/usr/local/bin/../lib/librustrt.so(rust_task_fail+0x36)[0x801b26]
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task4failEPKcS1_j+0x32)[0x801b92]
/usr/local/bin/../lib/librustrt.so(upcall_s_fail+0x53)[0x804063]
/usr/local/bin/../lib/librustrt.so(+0x33a03)[0x81ca03]
/usr/local/bin/../lib/librustrt.so(upcall_fail+0x1bc)[0x80477c]
/usr/local/bin/../lib/librustrt.so(rust_upcall_fail+0x2b)[0x8048bb]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(_ZN2rt7rt_fail17_b957bac32f5536163_04E+0x45)[0x92c485]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(_ZN4task5yield16_9531951b4f79f8b3_04E+0xc4)[0x94d2d4]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x756d5)[0x97b6d5]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x948d8)[0x99a8d8]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(_ZN4priv11weaken_task17_eda6f618d2801f443_04E+0xda)[0x97b22a]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x75144)[0x97b144]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x743e8)[0x97a3e8]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x73c47)[0x979c47]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x72fdd)[0x978fdd]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x60895)[0x966895]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x948d8)[0x99a8d8]
/usr/local/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x31)[0x802371]
leaked memory in rust main loop (1 objects)
rustc: /home/thomas/software/rust/src/rt/memory_region.cpp:172: memory_region::~memory_region(): Assertion `false' failed.
Aborted

@catamorphism
Copy link
Contributor

I'll take a look.

@catamorphism
Copy link
Contributor

Without trying it yet, probably something to do with the recursive use of Option<list<T>>. Option<@list<T>> might work. But we should fail more gracefully.

@ghost ghost assigned catamorphism Sep 10, 2012
@stegenish
Copy link
Author

I changed the code to use Option<@list> and I got the error I pasted in below. Let me know if it should be a separate issue.

struct list<T> {
    element: &self/T;
    mut next: Option<@list<T>>;
}

impl<T> list<T>{
    fn addEnd(&self, element: &self/T) {
        let newList = list {
            element: element,
            next: option::None
        };

        self.next = Some(@newList);
    }
}

fn main() {
    let s = @"str";
    let ls: list<@str> = list {
        element: &s,
        next: option::None
    };
    io::println(*ls.element);
}

rust: task failed at 'option::get none', /home/thomas/software/rust/src/rustc/rustc.rc:1
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_j+0x72)[0x86da82]
/usr/local/bin/../lib/librustrt.so(rust_task_fail+0x36)[0x86db26]
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task4failEPKcS1_j+0x32)[0x86db92]
/usr/local/bin/../lib/librustrt.so(upcall_s_fail+0x53)[0x870063]
/usr/local/bin/../lib/librustrt.so(+0x33a03)[0x888a03]
/usr/local/bin/../lib/librustrt.so(upcall_fail+0x1bc)[0x87077c]
/usr/local/bin/../lib/librustrt.so(rust_upcall_fail+0x2b)[0x8708bb]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(_ZN2rt7rt_fail17_b957bac32f5536163_04E+0x45)[0x136485]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x291d5f)[0x11f0d5f]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(_ZN6middle2ty19fold_regions_and_ty17_49583798a8f3b37d3_04E+0x477)[0x11ee947]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x291b18)[0x11f0b18]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(_ZN6middle2ty5subst16_adc88f3b4ac52603_04E+0x25d)[0x10e05bd]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(_ZN6middle2ty17lookup_field_type16_8a8879ced8a67e23_04E+0x16b)[0x10a17ab]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x142617)[0x10a1617]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x14254e)[0x10a154e]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(_ZN6middle5trans7type_of7type_of15_1e8c284f103cfd3_04E+0x197e)[0x10933de]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(_ZN6middle5trans7type_of7type_of15_1e8c284f103cfd3_04E+0x367)[0x1091dc7]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x6b6bac)[0x1615bac]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(_ZN6middle5trans4base8alloc_ty17_cd40e7bf1db9c7f83_04E+0x81)[0x10dc711]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(_ZN6middle5trans4base11alloc_local17_42bb44f91b1592503_04E+0xcc)[0x112b20c]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(_ZN6middle5trans4base11trans_block17_53e24dee50f387963_04E+0x100)[0x10e29c0]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(_ZN6middle5trans4base13trans_closure15_d59258f9b11dde3_04E+0x511)[0x1130e41]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(_ZN6middle5trans4base8trans_fn17_6cc7202655802c753_04E+0x122)[0x10ee012]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(_ZN6middle5trans4base10trans_item16_16ee369339743d93_04E+0xad8)[0x10fc4a8]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(_ZN6middle5trans4base11trans_crate17_423c1bc43277fe113_04E+0x1fc4)[0x1153074]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x68f7db)[0x15ee7db]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(_ZN6driver6driver12compile_upto16_9695e7b3d2f92c53_04E+0x1ecd)[0x15eb9dd]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(+0x6b6bac)[0x1615bac]
/usr/local/bin/../lib/librustc-1dce6680949bc7b9-0.4.so(_ZN6driver6driver13compile_input16_f6bd6f78725f7943_04E+0xc7)[0x15eebb7]
rustc[0x804f97b]
rustc[0x805a5d4]
rustc[0x805a282]
rustc[0x805660b]
rustc[0x8055bdd]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x60895)[0x170895]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x948d8)[0x1a48d8]
/usr/local/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x31)[0x86e371]
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/thomas/software/rust/src/rustc/driver/rustc.rs:272
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_j+0x72)[0x86da82]
/usr/local/bin/../lib/librustrt.so(rust_task_fail+0x36)[0x86db26]
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task4failEPKcS1_j+0x32)[0x86db92]
/usr/local/bin/../lib/librustrt.so(upcall_s_fail+0x53)[0x870063]
/usr/local/bin/../lib/librustrt.so(+0x33a03)[0x888a03]
/usr/local/bin/../lib/librustrt.so(upcall_fail+0x1bc)[0x87077c]
/usr/local/bin/../lib/librustrt.so(rust_upcall_fail+0x2b)[0x8708bb]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(_ZN2rt7rt_fail17_b957bac32f5536163_04E+0x45)[0x136485]
rustc[0x8054d5c]
rustc[0x805a5d4]
rustc[0x805a18a]
rustc(_rust_main+0x38)[0x805a1d8]
/usr/local/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x31)[0x86e371]
rust: domain main @0x8ff0290 root task failed
rust: task failed at 'killed', /home/thomas/software/rust/src/libcore/task.rs:579
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task13begin_failureEPKcS1_j+0x72)[0x86da82]
/usr/local/bin/../lib/librustrt.so(rust_task_fail+0x36)[0x86db26]
/usr/local/bin/../lib/librustrt.so(_ZN9rust_task4failEPKcS1_j+0x32)[0x86db92]
/usr/local/bin/../lib/librustrt.so(upcall_s_fail+0x53)[0x870063]
/usr/local/bin/../lib/librustrt.so(+0x33a03)[0x888a03]
/usr/local/bin/../lib/librustrt.so(upcall_fail+0x1bc)[0x87077c]
/usr/local/bin/../lib/librustrt.so(rust_upcall_fail+0x2b)[0x8708bb]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(_ZN2rt7rt_fail17_b957bac32f5536163_04E+0x45)[0x136485]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(_ZN4task5yield16_9531951b4f79f8b3_04E+0xc4)[0x1572d4]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x756d5)[0x1856d5]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x948d8)[0x1a48d8]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(_ZN4priv11weaken_task17_eda6f618d2801f443_04E+0xda)[0x18522a]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x75144)[0x185144]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x743e8)[0x1843e8]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x73c47)[0x183c47]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x72fdd)[0x182fdd]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x60895)[0x170895]
/usr/local/bin/../lib/libcore-c3ca5d77d81b46c1-0.4.so(+0x948d8)[0x1a48d8]
/usr/local/bin/../lib/librustrt.so(_Z18task_start_wrapperP10spawn_args+0x31)[0x86e371]

@catamorphism
Copy link
Contributor

Reproduced as of a477c5a

@catamorphism
Copy link
Contributor

So far, the issue seems to be an option::get failure because in trans, type_of is getting called on some type that's supposed to have a region parameter, with a set of substs that have None as a region parameter. Continuing to poke at it.

@nikomatsakis
Copy link
Contributor

trans generally ignores regions. It's almost certainly fine to always supply Some(ty::re_static) as the region substitution. However, of course I haven't looked closely at what's going on and there might be a deeper problem.

@catamorphism
Copy link
Contributor

I think there's a deeper problem, but I'm still digging.

@catamorphism
Copy link
Contributor

The bug in the original post is the same issue as #3389.

I'm about to check in a fix for the bug in the comment.

bors pushed a commit to rust-lang-ci/rust that referenced this issue May 15, 2021
RalfJung pushed a commit to RalfJung/rust that referenced this issue Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-type-system Area: Type system I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

No branches or pull requests

3 participants