Re: v13: Performance regression related to FORTIFY_SOURCE - Mailing list pgsql-hackers

From Tom Lane
Subject Re: v13: Performance regression related to FORTIFY_SOURCE
Date
Msg-id 1644593.1591408253@sss.pgh.pa.us
Whole thread Raw
In response to Re: v13: Performance regression related to FORTIFY_SOURCE  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: v13: Performance regression related to FORTIFY_SOURCE
List 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 by date:

Previous
From: Jeff Davis
Date:
Subject: Re: v13: Performance regression related to FORTIFY_SOURCE
Next
From: Jeff Davis
Date:
Subject: Re: v13: Performance regression related to FORTIFY_SOURCE