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

epoch: Fix stacked borrows violations #871

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

taiki-e
Copy link
Member

@taiki-e taiki-e commented Jul 20, 2022

Fixes #545

See #545 (comment) for the reported stacked borrows violations.

Note: this is a breaking change because changes API of Pointable trait

@taiki-e taiki-e marked this pull request as draft July 20, 2022 02:00
@taiki-e taiki-e force-pushed the epoch-fix-sb-violations branch from fcafef5 to 8e29940 Compare July 20, 2022 16:30
@taiki-e taiki-e marked this pull request as ready for review July 21, 2022 01:20
@taiki-e taiki-e force-pushed the epoch-fix-sb-violations branch 3 times, most recently from f25a4cd to a81e099 Compare July 22, 2022 15:24
@taiki-e taiki-e force-pushed the epoch-fix-sb-violations branch from a81e099 to e7c8fbf Compare July 22, 2022 16:54
@taiki-e taiki-e force-pushed the epoch-fix-sb-violations branch from e7c8fbf to 86c1680 Compare July 22, 2022 18:14
bors bot added a commit that referenced this pull request Jul 23, 2022
796: epoch: Remove ptr-to-int casts r=taiki-e a=taiki-e

Use [this hack](rust-lang/miri#1866 (comment)) to fix compatibility issues with Miri (see #490 (comment) for details). 

Due to the #545, still not compatible with stacked borrows. This will be fixed by the subsequent PR (#871).

Note: this is a breaking change because changes API of Pointable and Pointer traits

Fixes #579

881: Remove deprecated items r=taiki-e a=taiki-e

This removes the following deprecated items:

- crossbeam-epoch:
  - `CompareAndSetError`
  - `CompareAndSetOrdering`
  - `Atomic::compare_and_set`
  - `Atomic::compare_and_set_weak`
- crossbeam-utils:
  - `AtomicCell::compare_and_swap`

Co-authored-by: Taiki Endo <[email protected]>
bors bot added a commit that referenced this pull request Jul 23, 2022
796: epoch: Remove ptr-to-int casts r=taiki-e a=taiki-e

Use [this hack](rust-lang/miri#1866 (comment)) to fix compatibility issues with Miri (see #490 (comment) for details). 

Due to the #545, still not compatible with stacked borrows. This will be fixed by the subsequent PR (#871).

Note: this is a breaking change because changes API of Pointable and Pointer traits

Fixes #579

Co-authored-by: Taiki Endo <[email protected]>
@taiki-e taiki-e force-pushed the epoch-fix-sb-violations branch from 86c1680 to 525ae4f Compare July 23, 2022 08:50
@taiki-e taiki-e requested a review from jeehoonkang July 23, 2022 10:53
@taiki-e taiki-e force-pushed the epoch-fix-sb-violations branch 2 times, most recently from a8485b4 to f93970c Compare July 23, 2022 12:06
@taiki-e taiki-e force-pushed the epoch-fix-sb-violations branch from f93970c to 9d1ebd2 Compare September 23, 2022 10:23
@taiki-e taiki-e force-pushed the epoch-fix-sb-violations branch from 48e0dfd to be5bcc4 Compare November 20, 2022 08:04
/// - `ptr` should not be mutably dereferenced by [`Pointable::deref_mut`] concurrently.
unsafe fn deref<'a>(ptr: *mut ()) -> &'a Self;
/// - `ptr` should not be mutably dereferenced by [`Pointable::as_mut_ptr`] concurrently.
unsafe fn as_ptr(ptr: *mut ()) -> *const Self;

/// Mutably dereferences the given pointer.
Copy link
Member Author

Choose a reason for hiding this comment

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

This is no longer a dereference, but I'm not sure what is a good API name and description.

@taiki-e taiki-e marked this pull request as draft November 20, 2022 08:34
@taiki-e taiki-e marked this pull request as ready for review November 20, 2022 08:37
@taiki-e taiki-e force-pushed the epoch-fix-sb-violations branch from be5bcc4 to 87eecad Compare December 16, 2022 13:41
@taiki-e taiki-e force-pushed the epoch-fix-sb-violations branch from 87eecad to f0f7323 Compare December 27, 2022 14:43
@taiki-e taiki-e force-pushed the epoch-fix-sb-violations branch from f0f7323 to 6bd2fda Compare June 17, 2023 11:20
@taiki-e
Copy link
Member Author

taiki-e commented Jun 17, 2023

(Given that Miri appears to be trying to move to TB in the long term, I don't see the need to rush to merge this.)

@taiki-e taiki-e force-pushed the epoch-fix-sb-violations branch from 6bd2fda to a3fec7d Compare June 17, 2023 13:11
@taiki-e taiki-e removed the request for review from jeehoonkang August 27, 2023 15:45
@taiki-e taiki-e force-pushed the epoch-fix-sb-violations branch 2 times, most recently from df9c0ee to 9b332ee Compare December 23, 2023 20:11
@taiki-e taiki-e force-pushed the epoch-fix-sb-violations branch from 9b332ee to 3b4893b Compare December 23, 2023 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

epoch: Miri reports SB violation
1 participant