Re: valgrind error in tsvectorin - Mailing list pgsql-hackers

From Greg Stark
Subject Re: valgrind error in tsvectorin
Date
Msg-id 4136ffa0905141541r3a15455cxd40f606e88607ba7@mail.gmail.com
Whole thread Raw
In response to Re: valgrind error in tsvectorin  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: valgrind error in tsvectorin  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> Yeah, it looks like the memcpy is sometimes unnecessary because res and
> ptr point to the same place.  It might be worth cleaning up just to
> avoid the valgrind warning, but I doubt it would save any noticeable
> number of cycles.

I assume valgrind is warning about it because memcpy's behaviour is
undefined if the blocks overlap. I'm having trouble imagining an
implementation that would fail if they're precisely the same pointer
though.

--
greg


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: valgrind error in tsvectorin
Next
From: Alvaro Herrera
Date:
Subject: Re: [COMMITTERS] pgsql: Translation updates