[PATCH 21.5] Another valgrind complaint about memcpy

Jerry James james at xemacs.org
Sun Feb 3 21:14:14 EST 2008


PATCH 21.5

This fixes the only other complaint I'm getting from valgrind about
something of the form memcpy(&x, &x, sizeof(x));.  Twice in the
redisplay code, we try to optimize by building a dynarray entry in
place, then throw it all away by doing Dynarr_add, which copies the
bytes from where they are to ... um, where they are.  The fix is to
use Dynarr_increment in that case instead to bump up the size of the
dynarray to include the new entry.  I have run with this for a couple
of hours today, but have not given it extensive testing.
-- 
Jerry James
http://loganjerry.googlepages.com/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: memcpy.patch
Type: text/x-patch
Size: 1656 bytes
Desc: not available
Url : http://lists.xemacs.org/pipermail/xemacs-patches/attachments/20080203/3698fa69/memcpy.bin


More information about the XEmacs-Patches mailing list