[PATCH] Enforce strict overflow checking

Jeremy Allison jra at samba.org
Wed Mar 21 17:26:04 UTC 2018


On Wed, Mar 21, 2018 at 10:12:37AM -0700, Jeremy Allison via samba-technical wrote:
> On Wed, Mar 21, 2018 at 12:21:16PM +0100, Andreas Schneider wrote:
> > On Tuesday, 20 March 2018 22:38:44 CET Jeremy Allison wrote:
> > > On Tue, Mar 20, 2018 at 01:18:39PM -0700, Jeremy Allison via samba-technical 
> > wrote:
> > > > On Thu, Mar 15, 2018 at 10:16:11AM +0100, Andreas Schneider wrote:
> > > > > This is a ping :-)
> > > > > 
> > > > > 
> > > > > Thanks for the review!
> > > > 
> > > > OK, the only one I'm pushing back on is this:
> > > Having said that - [PATCH 32/39] lib:param: Fix P_LIST case in
> > > set_variable_helper() causes:
> > 
> > Here are the latest fixes addressing the remaining issues.
> > 
> > :-)
> > 
> > 
> > Please check. Thanks!
> 
> Reviewed-by: Jeremy Allison <jra at samba.org>
> 
> and pushed. Thanks !

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.

I've re-pushed without the final patch that
turns on '-Werror=strict-overflow -Wstrict-overflow=2'.



More information about the samba-technical mailing list