From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id zugqGCT0P2IrGAAAWB0awg (envelope-from ) for ; Sun, 27 Mar 2022 01:20:36 -0400 Received: by simark.ca (Postfix, from userid 112) id 535171F3E0; Sun, 27 Mar 2022 01:20:36 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id C6DB41F0E7 for ; Sun, 27 Mar 2022 01:20:35 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id CF4473857419 for ; Sun, 27 Mar 2022 05:20:34 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org CF4473857419 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1648358434; bh=cF6svgiHeaozE0ST4D42Pjkt8/bLKGIbSoex71FZo1E=; h=Date:To:In-Reply-To:Subject:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=tqMppkW3OIVtz8XpniwGyhfsqFEk2JhoesBxMPeFCbDar0BCcB83jB0c/uyTKGaMK uMjvDU5Mi8LwHEkZGgqtn+Rk4wHKA51k9jpAkNcYgoUoawCtVoPmfknVsrz3bRk9/t f+Ckf02l7T/Nmh7RuuIgGawFBDPVXznHgOTztowg= Received: from eggs.gnu.org (eggs.gnu.org [209.51.188.92]) by sourceware.org (Postfix) with ESMTPS id CD30D3858C83 for ; Sun, 27 Mar 2022 05:20:15 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org CD30D3858C83 Received: from [2001:470:142:3::e] (port=38010 helo=fencepost.gnu.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYLK2-0001hK-RT; Sun, 27 Mar 2022 01:20:14 -0400 Received: from [87.69.77.57] (port=4488 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nYLK2-00077i-B3; Sun, 27 Mar 2022 01:20:14 -0400 Date: Sun, 27 Mar 2022 08:20:13 +0300 Message-Id: <83k0cg9dki.fsf@gnu.org> To: Simon Marchi In-Reply-To: (message from Simon Marchi on Sat, 26 Mar 2022 21:55:38 -0400) Subject: Re: GDB 12.0.90 available for testing References: <20220320055815.2A90FA4D6C@takamaka.home> <83sfr4a93r.fsf@gnu.org> X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Eli Zaretskii via Gdb-patches Reply-To: Eli Zaretskii Cc: gdb-patches@sourceware.org, brobecker@adacore.com Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" > Date: Sat, 26 Mar 2022 21:55:38 -0400 > Cc: gdb-patches@sourceware.org > From: Simon Marchi > > > CXX infrun.o > > In file included from btrace.h:30, > > from gdbthread.h:29, > > from infrun.h:21, > > from infrun.c:23: > > target/waitstatus.h: In function 'void stop_all_threads()': > > target/waitstatus.h:175:13: warning: 'ws.target_waitstatus::m_value' may be used uninitialized in this function [-Wmaybe-uninitialized] > > 175 | m_value = other.m_value; > > | ~~~~~~~~^~~~~~~~~~~~~~~ > > > > Is this a real problem? > > I think this one is not really a problem. It complains about this code: > > target_waitstatus ws; > ws.set_no_resumed (); > return {NULL, minus_one_ptid, std::move (ws)}; > > When settnig `ws` using `set_no_resumed`, the union field ws::m_value is > left untouched, meaning it contains random bytes. When we move `ws`, we > copy random bytes. But that doesn't matter, because the destination > target_waitstatus is of kind TARGET_WAITKIND_NO_RESUMED, so doesn't care > about m_value. Maybe we should initialize ws::m_value, just to shut up the compiler? Because GDB 12 compiles cleanly other than this warning.