miri: do not apply aliasing restrictions to Box with custom allocator by RalfJung · Pull Request #122233 · rust-lang/rust (original) (raw)

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 andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})

RalfJung

@RalfJung

@rustbot rustbot added S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

T-libs

Relevant to the library team, which will review and decide on the PR/issue.

labels

Mar 9, 2024

@rustbot

Some changes occurred to the CTFE / Miri engine

cc @rust-lang/miri

The Miri subtree was changed

cc @rust-lang/miri

@oli-obk

The impl does what it describes. Gonna trust UCG that y'all are sure this is desirable to be legal ^^

@bors r+

@bors

📌 Commit e632e3f has been approved by oli-obk

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

and removed S-waiting-on-review

Status: Awaiting review from the assignee but also interested parties.

labels

Mar 9, 2024

bors added a commit to rust-lang-ci/rust that referenced this pull request

Mar 9, 2024

@bors

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Mar 9, 2024

@rust-timer

Rollup merge of rust-lang#122233 - RalfJung:custom-alloc-box, r=oli-obk

miri: do not apply aliasing restrictions to Box with custom allocator

This is the Miri side of rust-lang#122018. The "intrinsics with body" made this much more pleasant. :)

Fixes rust-lang/miri#3341. r? @oli-obk

celinval pushed a commit to model-checking/kani that referenced this pull request

Mar 12, 2024

@zhassan-aws

Relevant upstream changes:

rust-lang/rust#120675: An intrinsic Symbol is now wrapped in a IntrinsicDef struct, so the relevant part of the code needed to be updated. rust-lang/rust#121464: The second argument of the create_wrapper_file function changed from a vector to a string. rust-lang/rust#121662: NullOp::DebugAssertions was renamed to NullOp::UbCheck and it now has data (currently unused by Kani) rust-lang/rust#121728: Introduces F16 and F128, so needed to add stubs for them rust-lang/rust#121969: parse_sess was renamed to psess, so updated the relevant code. rust-lang/rust#122059: The is_val_statically_known intrinsic is now used in some core::fmt code, so had to handle it in (codegen'ed to false). rust-lang/rust#122233: This added a new retag_box_to_raw intrinsic. This is an operation that is primarily relevant for stacked borrows. For Kani, we just return the pointer.

Resolves #3057

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Mar 18, 2024

@matthiaskrgr

add_retag: ensure box-to-raw-ptr casts are preserved for Miri

In rust-lang#122233 I added retag_box_to_raw not realizing that we can already do addr_of_mut!(*bx) to turn a box into a raw pointer without an intermediate reference. We just need to ensure this information is preserved past the ElaborateBoxDerefs pass.

r? @oli-obk

matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request

Mar 18, 2024

@matthiaskrgr

add_retag: ensure box-to-raw-ptr casts are preserved for Miri

In rust-lang#122233 I added retag_box_to_raw not realizing that we can already do addr_of_mut!(*bx) to turn a box into a raw pointer without an intermediate reference. We just need to ensure this information is preserved past the ElaborateBoxDerefs pass.

r? @oli-obk

rust-timer added a commit to rust-lang-ci/rust that referenced this pull request

Mar 18, 2024

@rust-timer

Rollup merge of rust-lang#122647 - RalfJung:box-to-raw-retag, r=oli-obk

add_retag: ensure box-to-raw-ptr casts are preserved for Miri

In rust-lang#122233 I added retag_box_to_raw not realizing that we can already do addr_of_mut!(*bx) to turn a box into a raw pointer without an intermediate reference. We just need to ensure this information is preserved past the ElaborateBoxDerefs pass.

r? @oli-obk

github-actions bot pushed a commit to rust-lang/miri that referenced this pull request

Mar 19, 2024

@matthiaskrgr

add_retag: ensure box-to-raw-ptr casts are preserved for Miri

In rust-lang/rust#122233 I added retag_box_to_raw not realizing that we can already do addr_of_mut!(*bx) to turn a box into a raw pointer without an intermediate reference. We just need to ensure this information is preserved past the ElaborateBoxDerefs pass.

r? @oli-obk

Labels

S-waiting-on-bors

Status: Waiting on bors to run and complete tests. Bors will change the label on completion.

T-compiler

Relevant to the compiler team, which will review and decide on the PR/issue.

T-libs

Relevant to the library team, which will review and decide on the PR/issue.