3 ms·
memcpy is only defined for non-overlapping memory regions (otherwise you should use memmove), but many platforms use memmove for memcpy anyway to avoid breaking
by nyanpasu64 2y ago
memcpy is only defined for non-overlapping memory regions (otherwise you should use memmove), but many platforms use memmove for memcpy anyway to avoid breaking user programs in unpredictable ways. Apparently this has also led to some arguments and glibc version incompatibilities (https://www.win.tue.nl/~aeb/linux/misc/gcc-semibug.html https://www.win.tue.nl/~aeb/linux/misc/gcc-semibug.html).
- hinkley 2y agoI don’t know why I said “path”, I meant instruction.