Re: [HACKERS] GCC 7 warnings - Mailing list pgsql-hackers

From Andres Freund
Subject Re: [HACKERS] GCC 7 warnings
Date
Msg-id 20170410161627.qzijmrd2l22pfbwc@alap3.anarazel.de
Whole thread Raw
In response to Re: [HACKERS] GCC 7 warnings  (Andres Freund <andres@anarazel.de>)
List pgsql-hackers
On 2017-04-10 09:10:07 -0700, Andres Freund wrote:
> Hi,
> 
> On 2017-04-10 11:03:23 -0400, Peter Eisentraut wrote:
> > The release of GCC 7 is approaching [0], and the number of warnings in
> > PostgreSQL has gone up since we last looked [1].  Output attached.  (My
> > version is 7.0.1 20170408.)
> > 
> > Most of the issues have to do with concatenating two or more strings of
> > potential size MAXPGPATH into another buffer of size MAXPGPATH, which
> > could lead to truncation.
> 
> Hm, interesting - I don't see this with
> gcc-7 (Debian 7-20170407-1) 7.0.1 20170407 (experimental) [trunk revision 246759]
> although I do recall having seen them at some point.  Not sure what's up
> there.

Hm. That's with -Wformat-truncation=1 (which is what's added by -Wextra
afaics), I see a good chunk more with -Wformat-truncation=2 - but that's
not enabled by -Wall/extra, so I don't really see a problem right now?

- Andres



pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] GCC 7 warnings
Next
From: Tom Lane
Date:
Subject: Adding lfirst_node (was Re: [HACKERS] [sqlsmith] Planner crash on foreign table join)