-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
Tracking Issue for arithmetic and certain bitwise ops on AtomicPtr
#99108
Comments
fill new tracking issue for `feature(strict_provenance_atomic_ptr)` New tracking issue: rust-lang#99108. The generic strict provenance issue has a lot of discussions on its own, so I think it's meaningful to have a separate issue for atomic ptr methods.
In terms of implementation details, I think we should also improve the types at which we call the |
"The problem" with making rhs rust/library/core/src/intrinsics.rs Line 111 in 8a392a5
Making the second argument of a different type will probably require compiler changes. |
Indeed, and I think those compiler changes should be made. :) |
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]>
I think |
I think the only open question about this API is whether there is a better name for |
Why not just |
@tgross35 note that all atomic operations are wrapping, so I don't really like |
Feature gate:
#![feature(strict_provenance_atomic_ptr)]
This is a tracking issue for arithmetic and certain bitwise operations on
AtomicPtr
.As part of the strict provenance experiment #95228.
This feature adds arithmetic (
add
,sub
) and bitwise (or
,end
,xor
) atomic operations forAtomicPtr
in order to replace uses ofAtomicUsize
-but-actually-a-pointer to preserve provenance information for the compiler and removeusize
->ptr
casts from existing code.Arithmetic ops behave as the their non-atomic wrapping versions. Bitwise ops behave as
.map_addr(|x| x op val)
.Public API
Steps / History
Unresolved Questions
Footnotes
https://std-dev-guide.rust-lang.org/feature-lifecycle/stabilization.html ↩
The text was updated successfully, but these errors were encountered: