-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Call to vec::filter causes segfault in rustdoc tests #4439
Comments
Perhaps related: this code compiles ok but segfaults when run, for me at least:
It seems like calls to ~[T].filter always fail. Using vec::filter instead of the method seems to work ok. |
I think the original bug that I reported is a non-issue now, because borrowck now rejects the code with I'll check @Dretch 's example, but my guess is borrowck will reject it too. |
No, @Dretch 's example still segfaults. There goes that theory! |
I think the following simpler example captures both what's going wrong here, and in #4850:
|
I'm working on this, but don't know if I can get it done for 0.6 |
@catamorphism: Any luck tracking this down? I dug into it a bit tonight, and I've gotten as far as determining that both the self-by-value method and the scope that owns the object are calling the drop functionality, but I haven't yet figured out how the callee is supposed to know it shouldn't emit the drop glue. The liveness checker seems to be aware that ownership transferred into the method, but trans is still queuing up the unique pointer for cleanup. |
@erickt It's a trans bug. The way trans does by-value/by-move self is just horribly wrong and inconsistent. I couldn't see an easy fix -- I wanted to rewrite all the self code to use Datum, so as to make it more obvious what was going wrong, but didn't have time. Alternately, @nikomatsakis had some ideas about making the code (in trans and elsewhere) that deals with self more uniform, which might also expose the bug more clearly. Feel free to work on it, I don't have time to in the immediate future but am happy to try to answer questions. |
subscribing |
Rustdoc tests were segfaulting -- I narrowed down the problem to the call to
vec::filter
inprune_private_pass::fold_mod
. When I changed that tofiltered
, the segfault went away. Sorry, I don't have a more minimal test case at this point.@erickt , you may be interested (though the bug is likely in trans and not your fault).
The text was updated successfully, but these errors were encountered: