From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10]) by sourceware.org (Postfix) with ESMTPS id 0217B3857429 for ; Mon, 10 May 2021 19:22:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0217B3857429 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=whitebox@nefkom.net Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 4Ff9tc2zqFz1s46D; Mon, 10 May 2021 21:22:48 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.70]) by mail.m-online.net (Postfix) with ESMTP id 4Ff9tb6w6Vz1qqkh; Mon, 10 May 2021 21:22:47 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new, port 10024) with ESMTP id 1NZu08Sodupb; Mon, 10 May 2021 21:22:47 +0200 (CEST) X-Auth-Info: EEN9J9zXAOS3mhTQP/E7L8LBxSyYGz8EBR4pggCuh2h9KkjhAA6iplHYslH6H4zk Received: from igel.home (ppp-46-244-162-56.dynamic.mnet-online.de [46.244.162.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.mnet-online.de (Postfix) with ESMTPSA; Mon, 10 May 2021 21:22:47 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id 987832C3081; Mon, 10 May 2021 21:22:46 +0200 (CEST) From: Andreas Schwab To: Martin Sebor via Libc-alpha Cc: Florian Weimer , Martin Sebor , Joseph Myers Subject: Re: [PATCH] more out of bounds checking improvements References: <176ba75f-4299-073f-8319-66dbf9fe3f42@gmail.com> <87k0ot9trs.fsf@oldenburg.str.redhat.com> <87v98d6ldm.fsf@oldenburg.str.redhat.com> <2a7e377d-60c8-313b-9422-6cd0b4f5224c@gmail.com> <87fsyvf04w.fsf@oldenburg.str.redhat.com> <7da0198c-a478-d877-4b64-da5a50e7e87b@gmail.com> <871rae7a2o.fsf@oldenburg.str.redhat.com> <1f4620a7-c0db-23f7-c5a8-f47c2d7b2c36@gmail.com> X-Yow: Boys, you have ALL been selected to LEAVE th' PLANET in 15 minutes!! Date: Mon, 10 May 2021 21:22:46 +0200 In-Reply-To: <1f4620a7-c0db-23f7-c5a8-f47c2d7b2c36@gmail.com> (Martin Sebor via Libc-alpha's message of "Mon, 10 May 2021 12:37:51 -0600") Message-ID: <877dk64cmx.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 10 May 2021 19:22:52 -0000 On Mai 10 2021, Martin Sebor via Libc-alpha wrote: > It doesn't need to be disabled for GCC 11 but I don't know how to > be this selective with these version macros. If it's okay to use > __GNUC__ then this works: > > index 9389f6b548..6a061e6457 100644 > --- a/nss/makedb.c > +++ b/nss/makedb.c > @@ -792,7 +792,15 @@ write_output (int fd) > + nhashentries_total * sizeof (stridx_t))); > header->allocate = file_offset; > > - /* Help GCC 10 see iov_nelts doesn't overflow the writev argument. */ > + assert (iov_nelts <= INT_MAX); > + > +#if __GNUC__ == 10 You can use __GNUC_PREREQ (10, 0) && !__GNUC_PREREQ (11, 0) Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 "And now for something completely different."