Re: overlapping strncpy/memcpy errors via valgrind

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: overlapping strncpy/memcpy errors via valgrind
Дата
Msg-id CAM-w4HN2dN5iGwm-RajgmpzBb9F51HjnLBN_Qoht5ZH9PoLqpg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: overlapping strncpy/memcpy errors via valgrind  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Sun, Feb 17, 2013 at 4:26 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> 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.

In terms of runtime I strongly suspect the effect would be 0 due to
branch prediction.

The effect on the code cleanliness seems like a stronger argument but
I have a hard time getting upset about a single one-line if statement
in namestrcpy. I suspect the argument may have been that we have no
reason to believe namestrcpy is the only place this can happen.

-- 
greg



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Greg Stark
Дата:
Сообщение: Re: [RFC] indirect toast tuple support
Следующее
От: "David E. Wheeler"
Дата:
Сообщение: Re: JSON Function Bike Shedding