From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id COEeORivhGXkBycAWB0awg (envelope-from ) for ; Thu, 21 Dec 2023 16:33:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1703194392; bh=KUPtJ+nAfavRTBbBRFYCxCzIsMSM73Wk64/B3Xwb5+A=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=UtrJU6CQMtd5mmkcCkuxiuAJiKAUwDkdo9MKTYP2/QugHM3Er2KwyXCAEeeNp9TPl wcbEJBb7Z5Me7SOUy1pcqMP57+bzgReAI2wDZdMfd+HZpHitnnhQBhzxR5nnUzL6d/ UCAAYEma5kdTDnZKnt0yYhS/vh/H8EWnJhgRZxOs= Received: by simark.ca (Postfix, from userid 112) id E6EAC1E0C3; Thu, 21 Dec 2023 16:33:12 -0500 (EST) 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=gHjL8ECg; dkim-atps=neutral Received: from server2.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 ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id D410F1E0AC for ; Thu, 21 Dec 2023 16:33:10 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 6180F386F003 for ; Thu, 21 Dec 2023 21:33:10 +0000 (GMT) Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 5845C3858D37 for ; Thu, 21 Dec 2023 21:32:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 5845C3858D37 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 5845C3858D37 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=1703194380; cv=none; b=VEyfM0LMg05K2RWkP0vwcrr2jt5j21QftNLx60JCrJrDvX4+Wye6CZ0ENTkvzUmKbu5MHDxTIvy1wwMKYmpF6eTorRceSlLfOCs8Vz2I8sOsjskKaRGdfUIMv6N4fY3z2pOnCzlhG46wKSrM8dFQla4BYIQ3zVLCQXYbb399tvE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703194380; c=relaxed/simple; bh=KUPtJ+nAfavRTBbBRFYCxCzIsMSM73Wk64/B3Xwb5+A=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=l0lJBs4vmADz697PxO/M6xmkmcnTGIzmhiby1tZztGxWYZysWAau1uL2wPHTgYpuDl1Wsp4Vv0KPeXLgUkyrvYrjJDiHvV2UjMrtchq4LByVK/GCgwfORIdJyjSFK5X+ap50w/M86DStRH6zOAO7Ce19c0Swy3T9IxJ53ue4OZI= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1703194378; bh=KUPtJ+nAfavRTBbBRFYCxCzIsMSM73Wk64/B3Xwb5+A=; h=Date:Subject:To:References:From:In-Reply-To:From; b=gHjL8ECg97ZS+EWE+l6NYDzrbwyN+4tzsqW3qXpwIaWv2g+fhvKvuTYeNci0tgp54 fX+MgI8uwd5N2OfNCpyCMmueq9ABwmUhYS79ZDGZdnpIJPNNZSjHbcVY/mi8IG/87Y KuxoDzb2NQcvoiXIQDt80OTrvogc+ONgPdlebj84= Received: from [172.16.0.192] (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id E341F1E0AC; Thu, 21 Dec 2023 16:32:58 -0500 (EST) Message-ID: <01e8d488-3d58-47ba-910d-8e51e63ceb57@simark.ca> Date: Thu, 21 Dec 2023 16:32:58 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 15/26] gdbserver: check for nullptr condition in regcache::get_register_status Content-Language: fr To: Tankut Baris Aktemur , gdb-patches@sourceware.org References: <893ba2a52032456c31cbb868c2f2ae4e0661b6e0.1677582745.git.tankut.baris.aktemur@intel.com> From: Simon Marchi In-Reply-To: <893ba2a52032456c31cbb868c2f2ae4e0661b6e0.1677582745.git.tankut.baris.aktemur@intel.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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 2/28/23 06:28, Tankut Baris Aktemur via Gdb-patches wrote: > A regcache can be initialized with a register value buffer, in which > case, the register_status pointer is null. This condition is checked > in set_register_status, but not in get_register_status. Do this check > for consistence and safety. Ok, thanks, that answers my question on the previous patch :). Simon