Re: v13: Performance regression related to FORTIFY_SOURCE
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Davis <pgsql@j-davis.com>
Cc: Alvaro Herrera <alvherre@2ndquadrant.com>, pgsql-hackers@postgresql.org,
Peter Geoghegan <pg@bowt.ie>
Date: 2020-06-06T01:50:53Z
Lists: 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
Commits
-
Fix platform-specific performance regression in logtape.c.
- 1fbb6c93df30 13.0 landed