Skip to content

Conversation

taiki-e
Copy link
Member

@taiki-e taiki-e commented Mar 3, 2022

Use this hack 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

@taiki-e taiki-e changed the title epoch: Remove ptr-to-int casts epoch: Remove ptr-to-int casts & fix stacked borrows violations Mar 3, 2022
@taiki-e taiki-e marked this pull request as draft March 3, 2022 20:37
@taiki-e taiki-e force-pushed the epoch-remove-ptr-to-int-casts branch from 533296d to a1a79cd Compare March 3, 2022 20:45
@taiki-e taiki-e changed the title epoch: Remove ptr-to-int casts & fix stacked borrows violations epoch: Remove ptr-to-int casts Mar 3, 2022
@taiki-e taiki-e marked this pull request as ready for review March 4, 2022 02:11
@taiki-e taiki-e force-pushed the epoch-remove-ptr-to-int-casts branch 3 times, most recently from 74a77dc to cc5649a Compare April 23, 2022 02:18
@taiki-e taiki-e requested a review from jeehoonkang May 1, 2022 02:45
@taiki-e taiki-e force-pushed the epoch-remove-ptr-to-int-casts branch from cc5649a to ca8880b Compare May 1, 2022 03:30
@taiki-e taiki-e force-pushed the epoch-remove-ptr-to-int-casts branch from ca8880b to b229192 Compare July 7, 2022 01:24
@taiki-e taiki-e marked this pull request as draft July 7, 2022 01:25
@taiki-e taiki-e force-pushed the epoch-remove-ptr-to-int-casts branch 3 times, most recently from bca864d to 4e0f1d1 Compare July 9, 2022 08:01
@taiki-e taiki-e force-pushed the epoch-remove-ptr-to-int-casts branch 3 times, most recently from fda7170 to 59ec328 Compare July 19, 2022 11:38
@taiki-e taiki-e mentioned this pull request Jul 19, 2022
bors bot added a commit that referenced this pull request Jul 19, 2022
870: Fix miri test failure r=taiki-e a=taiki-e

Split the non-breaking part from #796.

Co-authored-by: Taiki Endo <[email protected]>
bors bot added a commit that referenced this pull request Jul 19, 2022
870: Fix miri test failure r=taiki-e a=taiki-e

Split the non-breaking part from #796.

Co-authored-by: Taiki Endo <[email protected]>
@taiki-e taiki-e force-pushed the epoch-remove-ptr-to-int-casts branch 5 times, most recently from aa8d95c to 7ef27ed Compare July 20, 2022 01:57
@taiki-e taiki-e marked this pull request as ready for review July 20, 2022 14:48
@taiki-e taiki-e force-pushed the epoch-remove-ptr-to-int-casts branch 5 times, most recently from 378cf5a to 99a3451 Compare July 22, 2022 15:19
@taiki-e
Copy link
Member Author

taiki-e commented Jul 22, 2022

r? @RalfJung @jonhoo

@RalfJung
Copy link
Contributor

Is there a specific question? I won't be able to do a review of the entire patch.

@taiki-e
Copy link
Member Author

taiki-e commented Jul 22, 2022

Sorry, I noticed I have no questions on this PR...

@taiki-e taiki-e force-pushed the epoch-remove-ptr-to-int-casts branch from 99a3451 to 46d0777 Compare July 23, 2022 07:09
@taiki-e
Copy link
Member Author

taiki-e commented Jul 23, 2022

bors r+

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
Copy link
Contributor

bors bot commented Jul 23, 2022

Build failed (retrying...):

@bors
Copy link
Contributor

bors bot commented Jul 23, 2022

Build succeeded:

@bors bors bot merged commit 0fbc9e2 into master Jul 23, 2022
@bors bors bot deleted the epoch-remove-ptr-to-int-casts branch July 23, 2022 08:47
bors bot added a commit to taiki-e/portable-atomic that referenced this pull request Jul 31, 2022
23: Provide stable equivalent of #![feature(strict_provenance_atomic_ptr)] r=taiki-e a=taiki-e

This provides stable equivalent of [`#![feature(strict_provenance_atomic_ptr)]`](rust-lang/rust#99108).

- `AtomicPtr::fetch_ptr_{add,sub}`
- `AtomicPtr::fetch_byte_{add,sub}`
- `AtomicPtr::fetch_{or,and,xor}`

These APIs are compatible with strict-provenance on `cfg(miri)`.
Otherwise, they are compatible with permissive-provenance.

Once `#![feature(strict_provenance_atomic_ptr)]` is stabilized, these APIs will be strict-provenance compatible in all cases from the version in which it is stabilized.

(This is also a generalization of what [I did in crossbeam-epoch](crossbeam-rs/crossbeam#796).)

Co-authored-by: Taiki Endo <[email protected]>
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 memory leak with crossbeam_epoch::pin()
2 participants