Re: v13: Performance regression related to FORTIFY_SOURCE

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeff Davis <pgsql(at)j-davis(dot)com>
Cc: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, pgsql-hackers(at)postgresql(dot)org, Peter Geoghegan <pg(at)bowt(dot)ie>
Subject: Re: v13: Performance regression related to FORTIFY_SOURCE
Date: 2020-06-06 01:50:53
Message-ID: 1644593.1591408253@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Jeff Davis <pgsql(at)j-davis(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2020-06-06 02:06:50 Re: v13: Performance regression related to FORTIFY_SOURCE
Previous Message Jeff Davis 2020-06-06 01:46:13 Re: v13: Performance regression related to FORTIFY_SOURCE