From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id xXU/M/9a/2r3JSEAWB0awg (envelope-from ) for ; Thu, 19 Nov 2026 15:24:31 -0500 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=gUqr3hs9; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id C00A51E023; Thu, 19 Nov 2026 15:24:31 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_SBL_CSS autolearn=ham autolearn_force=no version=4.0.1 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 0B9D01E023 for ; Thu, 19 Nov 2026 15:24:31 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 38FB14BA2E3E for ; Thu, 19 Nov 2026 20:24:30 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 38FB14BA2E3E Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=gUqr3hs9 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTP id 382B04BA2E21 for ; Thu, 19 Nov 2026 20:24:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 382B04BA2E21 Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 382B04BA2E21 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1795119845; cv=none; b=Jrp16d4JzZX1dZ6a/HRAO/44itr7277SZV8VOirYmrRfgWTn6y9WKvYI4LpjU4abomhoyu2Q8Jmr/QTCxuSx2eiFh6RzIMMPYsugt2paSrdnVorOdDdCibCSuXyCaKNVsew+GUJuZAoODV22WxHQgBwx5aeXPovFPo90xpMESg4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1795119845; c=relaxed/simple; bh=VbF3c0qv1IV8zC8W9yLNC+4PmSHW8/RskUVSEJ2HRws=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=rn5wfEV9lxycgH1puJgQa71TwSDJIeWiP+HVDxKQf/JLdSS27ijAvditYQ27jA53aEKzjso1NE0I6zIJ3o0LhEKfg47N4cDKcFQI0AAAPUekcdukJL3XK+ets6hFuuWNMmDfDJFAkcCdBE5198A1pFCb6hxgnXLjgCL2aWJIDNU= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=gUqr3hs9 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 382B04BA2E21 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1795119844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MNGZEHL3+VUdulDRSIMXbanLB9ak1Z0ZNVp4oz9U9tc=; b=gUqr3hs9xvrX/UlRqUEgJEhyRh6qvuz59qcD13sheB+rXdodtoWgLhUXJKxdv691dUHqPp 9PvfLUS/vMiPamfrMWkXl0MZQfT000ZiY0DKsUIOspLBhyRwoIbN9+0x3cy8GymSwRSHhe +WXXdkUvbcmEbPp/wIYV40wpsIephvk= Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-553-Pdn1LenJOUGqUCnUvLFpzw-1; Thu, 19 Nov 2026 15:24:02 -0500 X-MC-Unique: Pdn1LenJOUGqUCnUvLFpzw-1 X-Mimecast-MFC-AGG-ID: Pdn1LenJOUGqUCnUvLFpzw_1795119842 Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-949b0d3232fso33006185a.1 for ; Thu, 19 Nov 2026 12:24:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795119842; x=1795724642; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:to:subject:user-agent:mime-version:date :message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=MNGZEHL3+VUdulDRSIMXbanLB9ak1Z0ZNVp4oz9U9tc=; b=E+bxM0A/cfRZkTNW+hRvbjGco+JSvSjyh7f/PIltuolng0ZmxHuKt0LL1iVjus6S/y z02fuLLnSOnFDMN0GhNMr95W+3z50BeB9rP70zOtD5mWl+mCnPkG66FqOK1/5XWAZX6T L+BptG1/IQeFKGhNkvfp4kgij04QFJLdGDgbtf9xf91PZChkz+GPTvjYUlm/Jgpxp8An 2q96ERrSr4xEfBmzo6QzWPJh4LQkmnBt8zga/ihUmgqk++V2OrVhTmX9vKzktnLmbnDE hMxC9hNwlFobMT/NfDVR+X7Zp55cnnCrA0eS+wNPyHS9oCGWCpJTaAoUzWWXke3k6/Me ro6g== X-Forwarded-Encrypted: i=1; AL+hErHRGBGKpZKy9CN/HdWICWO8waLtqcbJp21aV4RlxvPzzSI+tYrszb+7IsUsS2l4j1shrZdTe18NvWDJ1g==@sourceware.org X-Gm-Message-State: APuU4Z9RkEP+bGYuN8tyzg/S15rYnk5Y5/TlAl37/tWQibQZofzFz3n0 ubiWsMJVFL5o7yp2nyilTYcFHp/7HE5myiKvDHDEYxTuAiZmoOt2zaf2VqCb0/IH0XQxJGgcnmJ JUrbIRKYv8WQfC3ceSChnv3eLhPMlrlFDDH8OeurLt46j2fBaFevZrVj0J2rN30M= X-Gm-Gg: AYBFou3i5KZCo3l5ou3n/cbPiZ2rISOlwwrgWAsCJTfvl8Dre9uP8Keu6DESBkWw30r hOext4/BRd49YoFvMT4rGWAuLh+MchvFJztIhVF2fRXmdk3RGpT4HIj0hamD82Bh0nq3Kcxjz6d XfVKW7BwPrIaUGpTuBkq0m5Oxdv8feP/sG4wXh1xaSMuyvuUxTwXYHGgHLQRfXNhP69R7bISCr0 QsSUY4gEPwlGTqbnxn2ZufHvPJ7AZpKkLQoGyBMld3D7d0uTCRNu73mMWa4XGz1zjO5BF8NOWx1 nPufecRudRBvxdOU/TK6MQbHnPk5g4vTCbLWJWjyslFqCrZGKJBpSJZA4Fx/002I5bwrQzEXQxu naPyO+jsyjUqDqAJaXbPhVe2mewHXiFiDIlKygciU0SM9WqckeXN6dNU= X-Received: by 2002:a05:620a:480e:b0:949:816f:cff3 with SMTP id af79cd13be357-949ba82355dmr154442585a.5.1795119841731; Thu, 19 Nov 2026 12:24:01 -0800 (PST) X-Received: by 2002:a05:620a:480e:b0:949:816f:cff3 with SMTP id af79cd13be357-949ba82355dmr154438685a.5.1795119841240; Thu, 19 Nov 2026 12:24:01 -0800 (PST) Received: from [150.1.200.157] ([172.56.105.46]) by smtp.gmail.com with ESMTPSA id af79cd13be357-949bb4481c2sm37682385a.43.2026.11.19.12.24.00 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 19 Nov 2026 12:24:00 -0800 (PST) Message-ID: Date: Thu, 19 Nov 2026 12:23:59 -0800 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdbserver: fix memory leak in vRun handling To: Andrew Burgess , gdb-patches@sourceware.org References: <1f52ddf6fec78fe15933d75609a09a1fcdc471a5.1795001077.git.aburgess@redhat.com> From: Keith Seitz In-Reply-To: <1f52ddf6fec78fe15933d75609a09a1fcdc471a5.1795001077.git.aburgess@redhat.com> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: _yOGa3dejRJ56tzmrL0uWsnJZKOiCFzsx4490igw8k4_1795119842 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed 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 Hi, On 11/18/26 3:24 AM, Andrew Burgess wrote: > diff --git a/gdb/testsuite/gdb.server/invalid-vrun.exp b/gdb/testsuite/gdb.server/invalid-vrun.exp > new file mode 100644 > index 00000000000..5f189b7feb9 > --- /dev/null > +++ b/gdb/testsuite/gdb.server/invalid-vrun.exp > @@ -0,0 +1,60 @@ > +# This testcase is part of GDB, the GNU debugger. > +# > +# Copyright 2026 Free Software Foundation, Inc. > +# > +# This program is free software; you can redistribute it and/or modify > +# it under the terms of the GNU General Public License as published by > +# the Free Software Foundation; either version 3 of the License, or > +# (at your option) any later version. > +# > +# This program is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > +# GNU General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License > +# along with this program. If not, see . > + > +# Test handling of vRun packet where argument fields contains invalid > +# non-hex characters. > + > +load_lib gdbserver-support.exp > + > +require allow_gdbserver_tests > + > +standard_testfile normal.c > + > +save_vars { GDBFLAGS } { > + # If GDB and GDBserver are both running locally, set the sysroot to avoid > + # reading files via the remote protocol (the `is_remote target` check is > + # already done above). Maybe I'm daft, but where is the "is_remote target" check done? I'm not seeing. AFAICT, this file follows an idiom used in other gdbserver tests, but they all check both "host" and "target". Otherwise, LGTM. Reviewed-By: Keith Seitz Keith > + if { ![is_remote host] } { > + set GDBFLAGS "$GDBFLAGS -ex \"set sysroot\"" > + } > + if {[prepare_for_testing "failed to prepare" $testfile $srcfile]} { > + return > + } > +}