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

Fix of a borrow checking soundness bug that exists on stable #51271

Closed
golddranks opened this issue Jun 1, 2018 · 2 comments
Closed

Fix of a borrow checking soundness bug that exists on stable #51271

golddranks opened this issue Jun 1, 2018 · 2 comments

Comments

@golddranks
Copy link
Contributor

golddranks commented Jun 1, 2018

My code apparently used to rely (accidentally) on a soundness bug on the borrow checker. Compile this on 1.26.1 (and 1.26) and it runs; compile on a nightly newer than 524ad9b9e 2018-05-30 and it errors. It's a good thing that this got fixed, but I couldn't find the commit that fixed it right away. Is this a known fix for a known problem?

A minimized example: https://play.rust-lang.org/?gist=30a66d680ee0b69bbadb2c83f7ccb27f&version=stable&mode=debug

I was able to create a segfault on 1.26.1 by mutating the borrowed value: https://play.rust-lang.org/?gist=02f748c8c4fd56af77f77961eae11d48&version=stable&mode=debug

(The original code was something like this)
https://play.rust-lang.org/?gist=d0b21febdd80775ebe280fb6e7bd5f30&version=stable&mode=debug

@hanna-kruppe
Copy link
Contributor

Looks like #51117 at a glance.

@golddranks
Copy link
Contributor Author

It indeed is. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants