From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS31976 209.132.180.0/23 X-Spam-Status: No, score=-3.0 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_GMAIL_RCVD, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 8E27F1F463 for ; Tue, 24 Sep 2019 17:09:10 +0000 (UTC) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type; q=dns; s=default; b=HCvU ydU0M3gQu7LDLIF+E/l8uadZ/bKh1mscfKyAC9ANgjZusPyIL1QM8zkWggtk7Muv e0nchv1u+xcB2cURfw+fdvzBXS2S9AxTkgXQlMb3TxlnWRJyRl37+1p0TDPUqnJV sOybaVL9T5AJ5mZSzfe7vqSGuauxLj8eZkUeZbg= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-type; s=default; bh=1ljaNslpL0 gN6couyoZEevnyn6g=; b=DUOwR4J3o0Cys038emGYRRkC1Epr0eaZMGM0J/TNef swoSb3B+VhbcRNj/nyARxIvfM8a2RIRgOVC/D3R8PsvZ+F92smFCkTJ69Y7dUJCY ciGPmvHpUPWM9mt6jjOyhg505NjegMtse5JtXW0ps32FDRSaks7q56y6Cm9mR36/ g= Received: (qmail 36940 invoked by alias); 24 Sep 2019 17:09:07 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 36927 invoked by uid 89); 24 Sep 2019 17:09:06 -0000 Authentication-Results: sourceware.org; auth=none X-HELO: mail-lf1-f65.google.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sqXzraB9A675O7Pm4/Liuoh/W7nplt75mK1FY9pd3+g=; b=aIF9ITokbPXpR+DdzEqNoig0Hn/y/PNyNNYKhFcwVMBZR64NEK1KGCROPU/3NzkHKC tTHSP9UoiMkHW41JRpqRlQAAHZCo6lMSj92XmrKjf9G1C+cJGRg+AjXwiz38ZNwVfxkK aTjaoNkNyeCqreyOt6LafjqrYC8tP+FTWkkRp/8tRRdBYysYeS18Of1RxQEbi78VShrz nU6fP/PALOvow4yAUhB4hn1CBYLtUOz3c2oZpKrk1oCnWVCleEzTUKeUpdUGCZa9Zgi6 wvQ8ZHK6NortEOqCYmSCraliLYIeqUnKWzCkjHWwX2nC+0yqPwxQqwT7jKaM7qufkxUj y0xw== MIME-Version: 1.0 References: <20190916221536.18500-1-alistair.francis@wdc.com> In-Reply-To: <20190916221536.18500-1-alistair.francis@wdc.com> From: Alistair Francis Date: Tue, 24 Sep 2019 10:04:20 -0700 Message-ID: Subject: Re: [PATCH] inet/net-internal.h: Fix uninitalised clntudp_call() variable To: Alistair Francis Cc: GNU C Library , Jeff Law , Joseph Myers , Zack Weinberg , "Maciej W. Rozycki" Content-Type: text/plain; charset="UTF-8" On Mon, Sep 16, 2019 at 3:19 PM Alistair Francis wrote: > > The total_deadline variable inside the clntudp_call() function inside > sunrpc/clnt_udp.c can cause uninitalised variable warnings when building > with GCC 8.3 or 9.2 on a platform with a 64-bit tv_nsec on a 32-bit > architecture. To fix the warning let's use the DIAG_* macros to hide the > warning. > > A GCC bug case has also been submitted: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91691 > > 2019-09-16 Alistair Francis > > * inet/net-internal.h: Fix uninitalised clntudp_call() variable Ping! Is this patch ok to go in? Alistair > --- > inet/net-internal.h | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/inet/net-internal.h b/inet/net-internal.h > index 2f522eef555..c774de2b78a 100644 > --- a/inet/net-internal.h > +++ b/inet/net-internal.h > @@ -23,6 +23,7 @@ > #include > #include > #include > +#include > > int __inet6_scopeid_pton (const struct in6_addr *address, > const char *scope, uint32_t *result); > @@ -96,6 +97,16 @@ __deadline_is_infinite (struct deadline deadline) > return deadline.absolute.tv_nsec < 0; > } > > +/* GCC 8.3 and 9.2 both incorrectly report total_deadline > + * (from sunrpc/clnt_udp.c) as maybe-uninitialized when tv_sec is 8 bytes > + * (64-bits) wide on 32-bit systems. We have to set -Wmaybe-uninitialized > + * here as it won't fix the error in sunrpc/clnt_udp.c. > + * A GCC bug has been filed here: > + * https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91691 > + */ > +DIAG_PUSH_NEEDS_COMMENT; > +DIAG_IGNORE_NEEDS_COMMENT (9, "-Wmaybe-uninitialized"); > + > /* Return true if the current time is at the deadline or past it. */ > static inline bool > __deadline_elapsed (struct deadline_current_time current, > @@ -120,6 +131,8 @@ __deadline_first (struct deadline left, struct deadline right) > return right; > } > > +DIAG_POP_NEEDS_COMMENT; > + > /* Add TV to the current time and return it. Returns a special > infinite absolute deadline on overflow. */ > struct deadline __deadline_from_timeval (struct deadline_current_time, > -- > 2.23.0 >