Hi,
patch applied and pushed,
Waldemar
Petar Jovanovic wrote,
Hi All,
The previous patch to fix generic memmove() was incorrect even though it
fixed issues with the tests. The comments in the memmove() function and
different failing test cases misled me to believe the call to memcopy()
was wrongly conditioned by __ARCH_HAS_BWD_MEMCPY__. It was not.
This generic memmove implementation assumes that memcpy does forward
copying and that no issues could be seen in this case. However, at least
MIPS arch has an optimized memcpy that uses prefetching and that
implementation does not work correctly for overlapping regions.
So, my suggestions is that for now we skip memcpy() calls for MIPS, and
if more arches in future come across this, we can unify it (same as it
was done for __ARCH_HAS_BWD_MEMCPY__).
Sorry for not fixing this correctly in the first patch already.
Thanks.
Regards,
Petar
Petar Jovanovic (1):
mips: avoid calling memcpy() from memmove() for MIPS arch
libc/string/generic/memmove.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
--
2.17.1