You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<ReadWriteProcessBuffer as ReadableProcessBuffer>::ptr returns *const u8 and, due to its implementation, it's valid to .cast_mut() that and then (in a single thread) write to it so long as it's not empty (and null). A WriteableProcessBuffer::mut_ptr function would be much less risky against implementation change and rely on more explicit promises.
The text was updated successfully, but these errors were encountered:
An alternative that would not be a breaking change: document explicitly that for any impl WriteableProcessBuffer, the return value of <ReadWriteProcessBuffer as ReadableProcessBuffer>::ptr must be a writeable pointer. This should be indicated in the unsafe trait requirements.
<ReadWriteProcessBuffer as ReadableProcessBuffer>::ptr
returns*const u8
and, due to its implementation, it's valid to.cast_mut()
that and then (in a single thread) write to it so long as it's not empty (and null). AWriteableProcessBuffer::mut_ptr
function would be much less risky against implementation change and rely on more explicit promises.The text was updated successfully, but these errors were encountered: