Re: valgrind error in tsvectorin

From: Greg Stark <stark(at)enterprisedb(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Postgres <pgsql-hackers(at)postgresql(dot)org>, Oleg Bartunov <oleg(at)sai(dot)msu(dot)su>, Teodor Sigaev <teodor(at)sigaev(dot)ru>
Subject: Re: valgrind error in tsvectorin
Date: 2009-05-14 22:41:17
Message-ID: 4136ffa0905141541r3a15455cxd40f606e88607ba7@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2009-05-14 22:41:25 Re: [COMMITTERS] pgsql: Translation updates
Previous Message Tom Lane 2009-05-14 22:27:40 Re: valgrind error in tsvectorin