Re: overlapping strncpy/memcpy errors via valgrind - Mailing list pgsql-hackers

From anarazel@anarazel.de
Subject Re: overlapping strncpy/memcpy errors via valgrind
Date
Msg-id da54cd4c-4cb9-46f8-950c-ce6efffbc918@email.android.com
Whole thread Raw
In response to Re: overlapping strncpy/memcpy errors via valgrind  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: overlapping strncpy/memcpy errors via valgrind  (Peter Geoghegan <peter.geoghegan86@gmail.com>)
List pgsql-hackers

Tom Lane <tgl@sss.pgh.pa.us> schrieb:

>Boszormenyi Zoltan <zb@cybertec.at> writes:
>> Then, why isn't memcpy() skipped if the source and dest are the same?
>> It would be a micro-optimization but a valid one.
>
>No, it'd be more like a micro-pessimization, because the test would be
>wasted effort in the vast majority of calls.  The *only* reason to do
>this would be to shut up valgrind, and that seems annoying.
>
>I wonder if anyone's tried filing a bug against valgrind to say that it
>shouldn't complain about this case.

You already need a suppression file to use valgrind sensibly, its easy enough to add it there. Perhaps we should add
oneto the tree? 

---
Please excuse brevity and formatting - I am writing this on my mobile phone.



pgsql-hackers by date:

Previous
From: "anarazel@anarazel.de"
Date:
Subject: Re: overlapping strncpy/memcpy errors via valgrind
Next
From: Peter Geoghegan
Date:
Subject: Re: overlapping strncpy/memcpy errors via valgrind