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

From Stephan Szabo
Subject Re: fix memcpy() overlap
Date
Msg-id 20040202132041.M61426@megazone.bigpanda.com
Whole thread Raw
In response to Re: fix memcpy() overlap  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: fix memcpy() overlap  (Michael van Elst <mlelstv@serpens.de>)
Re: fix memcpy() overlap  (Andrew Dunstan <andrew@dunslane.net>)
Re: fix memcpy() overlap  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
On Mon, 2 Feb 2004, Tom Lane wrote:

> Neil Conway <neilc@samurai.com> writes:
> > I don't know of a memcpy() implementation that would actually bail out
> > if called with two equal pointers, but perhaps there is one in
> > existence somewhere.
>
> This isn't a bug, and I see no reason to clutter the code just to shut
> up valgrind.

Isn't memcpy on overlapping (even entirely overlapping) buffers undefined
behavior unless the count is 0?

pgsql-patches by date:

Previous
From: "Nicolai Tufar"
Date:
Subject: Re: C locale sort in src/tools/make_ctags - solved
Next
From: Bruce Momjian
Date:
Subject: Re: [pgsql-hackers-win32] Proposed dirmod.c fix for Win32