[PATCH] Enforce strict overflow checking

Andreas Schneider asn at samba.org
Tue Apr 3 12:02:53 UTC 2018


On Tuesday, 3 April 2018 01:58:27 CEST Jeremy Allison wrote:
> On Tue, Mar 27, 2018 at 05:05:09PM +0200, Andreas Schneider via samba-
technical wrote:
> > On Friday, 23 March 2018 16:41:34 CEST Stefan Metzmacher via
> > samba-technical> 
> > wrote:
> > > Thanks! That's much better.
> > 
> > Attached is an updated version as we released pam_wrapper 1.0.6.
> > 
> > A private autobuild passed with the patchset already.
> > 
> > 
> > Please review. Thanks!
> 
> A quick question on these - why do you have the patch ?
> 
> s3:nmbd: Set -Wno-strict-overflow for nmbd if supported
> 
> diff --git a/source3/nmbd/wscript_build b/source3/nmbd/wscript_build
> index 843c900a4ba..c34deae6083 100644
> --- a/source3/nmbd/wscript_build
> +++ b/source3/nmbd/wscript_build
> @@ -1,5 +1,9 @@
>  #!/usr/bin/env python
> 
> +nmbd_cflags=''
> +if bld.CONFIG_SET('HAVE_WNO_STRICT_OVERFLOW'):
> +    nmbd_cflags='-Wno-strict-overflow'
> +
>  bld.SAMBA3_BINARY('nmbd',
>                   source='''
>                   asyncdns.c
> @@ -30,6 +34,7 @@ bld.SAMBA3_BINARY('nmbd',
>                   nmbd_workgroupdb.c
>                   nmbd_synclists.c
>                   ''',
> +                 cflags_end=nmbd_cflags,
>                   deps='''
>                   talloc
>                   tevent
> 
> 
> If I remove this I still get a clean build (at least
> here). Just checking before I finish review.

Ah, sorry my bad. I didn't have the tree with the reverted patch. Here we go:


../source3/nmbd/nmbd_incomingrequests.c: In function 
‘process_node_status_request’:
../source3/nmbd/nmbd_incomingrequests.c:344:8: error: assuming pointer 
wraparound does not occur when comparing P +- C1 with P +- C2 [-Werror=strict-
overflow]
  while (buf < bufend) {
        ^
cc1: all warnings being treated as errors




	Andreas

-- 
Andreas Schneider                   GPG-ID: CC014E3D
Samba Team                             asn at samba.org
www.samba.org





More information about the samba-technical mailing list