[PATCH] Fix realloc

Ulrich Drepper drepper@redhat.com
Wed Dec 27 15:27:00 GMT 2000


Jakub Jelinek <jakub@redhat.com> writes:

> realloc was using memcpy even for copies where source and destination might
> overlap. Found with new alphaev6 memcpy during make check.

Thanks.  Looks safe to me, Wolfram should comment as well.  I've
applied the patch after removing most of the MALLOC_MEMMOVE
definition.  It cannot be correct since it didn't change the copy
direction.  The macro for now simply calls memmove. If you want to
provide a more complicated, faster version please go ahead.

Thanks,

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------


More information about the Libc-hacker mailing list