Re: Recursive ReceiveSharedInvalidMessages not safe

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Recursive ReceiveSharedInvalidMessages not safe
Дата
Msg-id 20140508163953.GB5556@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: Recursive ReceiveSharedInvalidMessages not safe  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2014-05-05 15:41:22 -0400, Tom Lane wrote:
> > After far, far too much confused head scratching, code reading, random
> > elog()s et al I found out that this is just because of a deficiency in
> > valgrind's undefinedness tracking. [...]
> > Unfortunately this cannot precisely be caught by valgrind's
> > suppressions. Thus I'd like to add memset(SharedInvalidationMessage msg,
> > 0) in AddCatcacheInvalidationMessage() et al. to suppress these
> > warnings. Imo we can just add them unconditionally, but if somebody else
> > prefers we can add #ifdef USE_VALGRIND around them.
>
> I'd be okay with USE_VALGRIND.  I'm not particularly hot on adding a
> memset for everybody just to make valgrind less confused.  Especially
> since that's really going to hide any problems, not fix them.

The attached patch does VALGRIND_MAKE_MEM_DEFINED() on the relevant
structs. That's already defined to empty if USE_VALGRIND isn't defined.

Greetings,

Andres Freund

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

Вложения

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

Предыдущее
От: andres@2ndquadrant.com
Дата:
Сообщение: [PATCH] Fix harmless access to uninitialized memory in ri_triggers.c.
Следующее
От: Andres Freund
Дата:
Сообщение: Re: Recursive ReceiveSharedInvalidMessages not safe