Re: longjmp clobber warnings are utterly broken in modern gcc

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: longjmp clobber warnings are utterly broken in modern gcc
Дата
Msg-id 20150126163059.GE9916@awork2.anarazel.de
обсуждение исходный текст
Ответ на Re: longjmp clobber warnings are utterly broken in modern gcc  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On 2015-01-26 11:18:41 -0500, Tom Lane wrote:
> Also and perhaps more to the point, I'm no longer convinced that this sort
> of thing doesn't require any volatile markers.  The fundamental problem
> we're hitting with PG_TRY is that the compiler is optimizing on the
> assumption that no "unexpected" touches/changes of local variables can
> happen as a result of unexpected control flow.  I think it might still be
> willing to optimize away superficially-dead stores even if you structure
> stuff as above.  We need to take a closer look at the uses of
> PG_ENSURE_ERROR_CLEANUP as well ...

Robert's premise was that the new notion doesn't allow catching an
error. If the state that's passed isn't endangered (because it's marked
volatile :(), then there's no danger with the bit after the CATCH
block. That's obviously not the case for ENSURE_ERROR_CLEANUP. That
definitely needs volatiles for stuff that's referenced after the TRY
block if modified inside.

Greetings,

Andres Freund

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



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: longjmp clobber warnings are utterly broken in modern gcc
Следующее
От: Andrew Gierth
Дата:
Сообщение: Abbreviated keys for Numeric (was: Re: B-Tree support function number 3 (strxfrm() optimization))