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

detect when pthread_rwlock_t is moved #3871

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

Mandragorian
Copy link
Contributor

@Mandragorian Mandragorian commented Sep 9, 2024

For some implementations of pthreads, the address of pthread_rwlock_t (or its fields) is used to identify the lock. That means that if the contents of a pthread_rwlock_t are moved in memory, effectively a new lock object is created, which is completely independted from the original. Thus we want to detect when when such objects are moved and show an error.

see also #3749 for more context

For some implementations of pthreads, the address of pthread_rwlock_t
(or its fields) is used to identify the lock. That means that if the
contents of a pthread_rwlock_t are moved in memory, effectively a new
lock object is created, which is completely independted from the
original. Thus we want to detect when when such objects are moved and
show an error.
@Mandragorian Mandragorian marked this pull request as ready for review September 9, 2024 12:03
@Mandragorian
Copy link
Contributor Author

@rustbot ready

@rustbot rustbot added the S-waiting-on-review Status: Waiting for a review to complete label Sep 9, 2024
@RalfJung
Copy link
Member

RalfJung commented Sep 9, 2024

Looks good, thanks. :)
@bors r+

@bors
Copy link
Contributor

bors commented Sep 9, 2024

📌 Commit 56fbbcb has been approved by RalfJung

It is now in the queue for this repository.

@bors
Copy link
Contributor

bors commented Sep 9, 2024

⌛ Testing commit 56fbbcb with merge 1c1524d...

@bors
Copy link
Contributor

bors commented Sep 9, 2024

☀️ Test successful - checks-actions
Approved by: RalfJung
Pushing 1c1524d to master...

@bors bors merged commit 1c1524d into rust-lang:master Sep 9, 2024
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Waiting for a review to complete
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants