Skip to content

fix UB in a pointer addition#120

Open
folkertdev wants to merge 1 commit into
rusticstuff:mainfrom
folkertdev:fix-ptr-add-ub
Open

fix UB in a pointer addition#120
folkertdev wants to merge 1 commit into
rusticstuff:mainfrom
folkertdev:fix-ptr-add-ub

Conversation

@folkertdev
Copy link
Copy Markdown

A ptr.add(...) asserts that the pointer is valid at construction; wrapping_add defers that until actual use, and the prefetch intrinsic is kind of special in that it does not truly load from the pointer. So, using wrapping_add makes miri happy

A `ptr.add(...)` asserts that the pointer is valid at construction; `wrapping_add` defers that until actual use, and the prefetch intrinsic is kind of special in that it does not truly load from the pointer. So, using `wrapping_add` makes miri happy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant