-
Notifications
You must be signed in to change notification settings - Fork 13.2k
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
block as a class leads to segfaults #2584
Comments
Here's a backtrace:
This branch should have exactly the code to make this happen on a Mac: https://github.com/eholk/rust/commits/issue-2548 |
See #2633 for the root cause of this problem. There are at least two possible easy workarounds, though: change move_val not to take an lval_result (it doesn't actually use the bcx field in its lval_result argument), and just take the kind and val as separate arguments; or make move_val's block argument pass-by-copy. I'm implementing one of these. Or if you get impatient, @eholk , you should be able to do the same in your local branch :-) |
Thanks for tracking this down! |
It was a fun one (though it turned out to not really be about classes at all!) |
That seems to fix the problem, but since the segfault is in rustc, we are unfortunately going to need a snapshot. |
The recent change seems to make it possible to end up with one of the block fields being a null pointer. A patch that exposes this behavior is available at https://gist.github.com/2925753
The text was updated successfully, but these errors were encountered: