[PATCH] Enforce strict overflow checking
Andreas Schneider
asn at samba.org
Wed Mar 21 18:33:33 UTC 2018
On Wednesday, 21 March 2018 19:22:45 CET Jeremy Allison wrote:
> On Thu, Mar 22, 2018 at 06:55:57AM +1300, Andrew Bartlett wrote:
> > On Wed, 2018-03-21 at 10:26 -0700, Jeremy Allison via samba-technical
> >
> > wrote:
> > > Spoke too soon. On my workstation the build passes,
> > >
> > > gcc -v
> > > gcc version 7.3.0 (Debian 7.3.0-5)
> > >
> > > but on sn-devel we have:
> > >
> > > [ 658/4270] Compiling lib/util/util_file.c
> > > ../lib/util/util_file.c: In function ???fgets_slash???:
> > > ../lib/util/util_file.c:108:8: error: assuming signed overflow does not
> > > occur when simplifying conditional to constant
> > > [-Werror=strict-overflow]> >
> > > while (len < maxlen-1) {
> > >
> > > ^
> > >
> > > ../lib/util/util_file.c:108:8: error: assuming signed overflow does not
> > > occur when simplifying conditional to constant
> > > [-Werror=strict-overflow] cc1: all warnings being treated as errors
> > >
> > > sn-devel-144:~$ gcc -v
> > > gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.4)
> > >
> > > Andreas, I think you're going to have to work this
> > > through on sn-devel first if it's going to go
> > > through.
> >
> > Or push to github and have travis-ci chew it over (make a pull request
> > or set it up on the source repo). Andreas did that (made a pull
>
> Yes, but that would mean pushing to a proprietary software-as-a-service
> provider, which is something we're trying to avoid.
>
> github != Free Software.
>
> We need to remember that. Yes I know I also work for a proprietary
> software-as-a-service vendor, but none of our infrastructure *depends*
> on it. I'm trying to avoid us drifting into that place by accident.
I have a new patchset in preparation with more fixes as autobuild found more
issues then my newer gcc.
However I have a segfault right now I'm trying to spot :-)
Andreas
--
Andreas Schneider GPG-ID: CC014E3D
Samba Team asn at samba.org
www.samba.org
More information about the samba-technical
mailing list