From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 8r+TDQ6++Gl6/hIAWB0awg (envelope-from ) for ; Mon, 04 May 2026 11:41:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1777909262; bh=5ULXlS+h1Sg36fH8PWE0oWIx5kRyJSPWUsT9p753glE=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=P4IlyuESrBWwkCLE0v02Fl6AOmJFBW7bQSeKhRuooxhjU+6O1qlHdezSO27bLZE2j wHY6tL+/wOVW60GBf/DB1vPBT/HBoSe2eEii0hRX3uwGb/i2rvcZSCLHUfgbv38mpQ 4lov8n0LgRaonRxh79/f553aC4jN0CNt7jEMJcMM= Received: by simark.ca (Postfix, from userid 112) id 1D76D1E0BA; Mon, 04 May 2026 11:41:02 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=MY2lCMUf; dkim-atps=neutral Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 5C5841E067 for ; Mon, 04 May 2026 11:41:01 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 236544BAD167 for ; Mon, 4 May 2026 15:41:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 236544BAD167 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=simark.ca header.i=@simark.ca header.a=rsa-sha256 header.s=mail header.b=MY2lCMUf Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 827314BA5439 for ; Mon, 4 May 2026 15:40:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 827314BA5439 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 827314BA5439 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777909236; cv=none; b=msg4yCkdS/evBp14mRcLFPLtRRRvYzyLevXCcsO7inBmSQYszxSw8XkF5jQoSMeOCZaPjt1MS5OHhB8MN4800s8fZG1I2plqJA5zkIMK+ovOBcJI1JCyQMzGF8mVYle55iH4ms3MQzvlZJ+PNciE5xYAVCSOGcWTfbUzhjbYiYQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1777909236; c=relaxed/simple; bh=5ULXlS+h1Sg36fH8PWE0oWIx5kRyJSPWUsT9p753glE=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=UMi48iiih1lReCFzy/dnBPYTq3hc5KaqaYVbLNqHE2Cqq/Vo/3Kr5ThLMRWqP4/D+mJtwBmkvqimmr/bMnnGRtnGp0anYMmNajYbTBfCMeY74GjuD5E8/c+25FO32VGcu8C1z2CZhC0xadiYsueFYnUBzMEB7tJDhOzv0oh18mE= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 827314BA5439 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1777909235; bh=5ULXlS+h1Sg36fH8PWE0oWIx5kRyJSPWUsT9p753glE=; h=Date:Subject:To:References:From:In-Reply-To:From; b=MY2lCMUf/CN7Ig21Wx/mQPTKf3Q6zKnf0HbSvwMQsez1jRS89uVsdHGJn0HAl0MmI jFCK2WMW2kFNqEI/+KNsVcsVDzgy8ld44GXjUQiEaUErZHsxtU77iyL7bswr1CbWlA +WNiu9NNXavu4F6w696FODEJUiUfgIt1lR3FX2vg= Received: by simark.ca (Postfix) id 6F7F91E067; Mon, 04 May 2026 11:40:34 -0400 (EDT) Message-ID: Date: Mon, 4 May 2026 11:40:34 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdb, remote: fix notify debug nullptr dereference To: Markus Metzger , gdb-patches@sourceware.org References: <20260504071636.1571615-1-markus.t.metzger@intel.com> <20260504071636.1571615-3-markus.t.metzger@intel.com> Content-Language: fr From: Simon Marchi In-Reply-To: <20260504071636.1571615-3-markus.t.metzger@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 5/4/26 3:16 AM, Markus Metzger wrote: > In remote_target:push_stop_reply, notif debug prints an element that has > been moved. Print the element at the destination, instead. So, there is a clang-tidy check for that, and indeed it finds it (and more, but I'm just pasting the relevant one): $ clang-tidy '-checks=bugprone-use-after-move' remote.c ... /home/smarchi/src/binutils-gdb/gdb/remote.c:8409:3: warning: 'new_event' used after it was moved [bugprone-use-after-move] 8409 | new_event->ptid.to_string ().c_str (), | ^ /home/smarchi/src/binutils-gdb/gdb/remote.c:8404:24: note: move occurred here 8404 | rs->stop_reply_queue.push_back (std::move (new_event)); I think we should set up a .clang-tidy file with the checks we care about an run it in the CI, I'll look into that. Approved-By: Simon Marchi Simon