Skip to content

Assert that Copy's source and destination do not overlap #23594

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

Open
wants to merge 3 commits into
base: blead
Choose a base branch
from

Conversation

mauke
Copy link
Contributor

@mauke mauke commented Aug 17, 2025

memcpy has undefined behavior if the source/destination ranges overlap, so assert that they don't.


  • This set of changes does not require a perldelta entry.

mauke added 3 commits August 17, 2025 22:35
These macros are identical to the ...D forms except for their return
type, which is void. So just define Move/Copy/Zero in terms of
MoveD/CopyD/ZeroD.
It is a bit hard to tell (and even harder to change) what exactly these
macros are doing if everything is crammed into one line.
memcpy() has undefined behavior if the source/destination ranges
overlap, so assert that they don't.
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.

2 participants