-
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
by-val and by-move can be dangerous when combined #2443
Labels
A-lifetimes
Area: Lifetimes / regions
Milestone
Comments
just realized---this should be easy to fix with borrowck, but we don't handle it now. we don't seem to get the scope right when checking that there is no move from a borrow ptr. |
Obsolete given scheduled removal of modes (or at least WONTFIX). |
jbclements
added a commit
to jbclements/rust
that referenced
this issue
Apr 3, 2013
jbclements
added a commit
to jbclements/rust
that referenced
this issue
Apr 4, 2013
jbclements
added a commit
to jbclements/rust
that referenced
this issue
Apr 10, 2013
RalfJung
pushed a commit
to RalfJung/rust
that referenced
this issue
May 13, 2023
Add `./miri run-dep` for running a file with test dependencies available fixes rust-lang#2443
RalfJung
pushed a commit
to RalfJung/rust
that referenced
this issue
Jun 3, 2023
Hide full miri command line in `./miri run-dep` fixes rust-lang#2443
celinval
pushed a commit
to celinval/rust-dev
that referenced
this issue
Jun 4, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, the compiler does not account for the fact that "by value" passing of ref-counted boxes is in fact a borrow. This can be fixed easily enough in borrowck (or, I imagine, in alias). In any case, I added an xfail'd test (by-val-and-by-move.rs) that demonstrates the problem. This test fails (note the environment variable RUST_POISON_ON_FREE---without that, the test may accidentally pass even though it is accessing a freed pointer).
The text was updated successfully, but these errors were encountered: