Re: v13: Performance regression related to FORTIFY_SOURCE

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: v13: Performance regression related to FORTIFY_SOURCE
Дата
Msg-id 1644593.1591408253@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: v13: Performance regression related to FORTIFY_SOURCE  (Jeff Davis <pgsql@j-davis.com>)
Ответы Re: v13: Performance regression related to FORTIFY_SOURCE  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
Jeff Davis <pgsql@j-davis.com> writes:
> On Thu, 2020-06-04 at 16:35 -0400, Alvaro Herrera wrote:
>> If it is something worth worrying about, let's discuss what's a good
>> fix for it.

> While making a minimal test case for the GCC bug report, I found
> another surprisingly-small workaround. Patch attached.

Ugh :-( ... but perhaps you could get the same result like this:

-#define TapeBlockPayloadSize  (BLCKSZ - sizeof(TapeBlockTrailer))
+#define TapeBlockPayloadSize  (BLCKSZ - (int) sizeof(TapeBlockTrailer))

Or possibly casting the whole thing to int or unsigned int would be
better.  Point being that I bet it's int vs long that is making the
difference.

            regards, tom lane



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

Предыдущее
От: Jeff Davis
Дата:
Сообщение: Re: v13: Performance regression related to FORTIFY_SOURCE
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: v13: Performance regression related to FORTIFY_SOURCE