Re: overlapping strncpy/memcpy errors via valgrind

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: overlapping strncpy/memcpy errors via valgrind
Дата
Msg-id 20130217151937.GB5073@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: overlapping strncpy/memcpy errors via valgrind  (Greg Stark <stark@mit.edu>)
Ответы Re: overlapping strncpy/memcpy errors via valgrind  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2013-02-17 15:10:35 +0000, Greg Stark wrote:
> Peter G is sitting near me and reminded me that this issue came up in the
> past. Iirc the conclusion then is that we're calling memcpy where the
> source and destination pointers are sometimes identical. Tom decided there
> was really no realistic architecture where that wouldn't work. 

I am not so convinced that that is safe if libc turns that into some
optimized string instructions or even PCMPSTR...

> We're not calling it on overlapping nonidentical pointers.

Yup, the backtrace shows that...

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



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

Предыдущее
От: Phil Sorber
Дата:
Сообщение: Re: [PATCH] Add PQconninfoParseParams and PQconninfodefaultsMerge to libpq
Следующее
От: Tom Lane
Дата:
Сообщение: Re: overlapping strncpy/memcpy errors via valgrind