Skip to content

Conversation

@RalfJung
Copy link
Member

@RalfJung RalfJung commented Nov 7, 2025

Overwriting the object will destroy its magic metadata, so it needs to be re-initialized (which will fail since the bytes no longer match the static initializer). Furthermore, reading or writing the object while threads are queued is insta-UB.

Fixes #4670

@rustbot
Copy link
Collaborator

rustbot commented Nov 7, 2025

Thank you for contributing to Miri! A reviewer will take a look at your PR, typically within a week or two.
Please remember to not force-push to the PR branch except when you need to rebase due to a conflict or when the reviewer asks you for it.

@rustbot rustbot added the S-waiting-on-review Status: Waiting for a review to complete label Nov 7, 2025
@RalfJung RalfJung force-pushed the sync-objs branch 2 times, most recently from 5905338 to 6791f74 Compare November 7, 2025 14:45
@RalfJung RalfJung enabled auto-merge November 8, 2025 11:38
Copy link
Contributor

@oli-obk oli-obk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice scheme. I like how our existing before_memory_read and extra alloc data system makes this all fairly straight forward to support

View changes since this review

@RalfJung RalfJung disabled auto-merge November 8, 2025 12:51
@RalfJung RalfJung enabled auto-merge November 8, 2025 13:55
@RalfJung RalfJung added this pull request to the merge queue Nov 8, 2025
Merged via the queue into rust-lang:master with commit 7d5ae36 Nov 8, 2025
13 checks passed
@RalfJung RalfJung deleted the sync-objs branch November 8, 2025 14:52
@rustbot rustbot removed the S-waiting-on-review Status: Waiting for a review to complete label Nov 8, 2025
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

Successfully merging this pull request may close these issues.

Immovable synchronization primitives do not detect swapping

3 participants