Re: fix memcpy() overlap

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Stephan Szabo <sszabo(at)megazone(dot)bigpanda(dot)com>, Neil Conway <neilc(at)samurai(dot)com>, PostgreSQL Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: fix memcpy() overlap
Date: 2004-02-03 16:52:31
Message-ID: 19260.1075827151@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2004-02-03 16:56:06 Re: [PATCHES] log session end - again
Previous Message Larry Rosenman 2004-02-03 16:33:51 Re: session IDs