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

Segfault with explicit, by-value self and vectors #4318

Closed
Dretch opened this issue Dec 31, 2012 · 4 comments
Closed

Segfault with explicit, by-value self and vectors #4318

Dretch opened this issue Dec 31, 2012 · 4 comments
Assignees
Labels
A-codegen Area: Code generation A-trait-system Area: Trait system I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.

Comments

@Dretch
Copy link
Contributor

Dretch commented Dec 31, 2012

The following code compiles but segfaults when run:

trait F<T> {
    fn f(self);
}

impl <T> ~[T] : F<T> {
    fn f(self) {}
}

fn main() {
    (~[1]).f();
}

Changing f to take &self makes it work.

This might be related to #4132

@graydon
Copy link
Contributor

graydon commented May 8, 2013

I believe this is a dupe of #4318 , #4355 , #4439 , #4850 , #4878 , #5444

Not sure which to consider the "central" but people keep hitting this. @nikomatsakis any idea what the cause is?

@graydon
Copy link
Contributor

graydon commented May 8, 2013

Also: reproduced. It's definitely still happening.

@nikomatsakis
Copy link
Contributor

I have not looked into this particular problem in detail, but it's worth doing. I'll try to carve out some time.

@Dretch
Copy link
Contributor Author

Dretch commented May 26, 2013

The original test case now (after updating it to modern syntax) compiles and runs without error.

So this seems to be fixed - I am closing it. Thanks!

@Dretch Dretch closed this as completed May 26, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-codegen Area: Code generation A-trait-system Area: Trait system I-crash Issue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.
Projects
None yet
Development

No branches or pull requests

3 participants