Re: fix memcpy() overlap - Mailing list pgsql-patches

From Tom Lane
Subject Re: fix memcpy() overlap
Date
Msg-id 19260.1075827151@sss.pgh.pa.us
Whole thread Raw
In response to Re: fix memcpy() overlap  (Bruce Momjian <pgman@candle.pha.pa.us>)
Responses Re: fix memcpy() overlap  (Neil Conway <neilc@samurai.com>)
List pgsql-patches
Bruce Momjian <pgman@candle.pha.pa.us> writes:
> Isn't memmove() for overlaping regions?  That's what my BSD manual page
> says.

If we want to get rid of the valgrind warning, a simpler patch would be
to substitute memmove for memcpy in that particular numeric.c subroutine
(at least, I assume this will shut valgrind up).  I could live with that;
it seems a less intrusive fix than a special-case test that will hardly
ever trigger.

            regards, tom lane

pgsql-patches by date:

Previous
From: Tom Lane
Date:
Subject: Re: Fix memcmp() with different sizes.
Next
From: "Mark Cave-Ayland"
Date:
Subject: Re: ANALYZE patch for review