From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id gXGtAa1RBGt4ey8AWB0awg (envelope-from ) for ; Mon, 23 Nov 2026 09:46:05 -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=XucC1HNk; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 02E871E09B; Mon, 23 Nov 2026 09:46:05 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 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 autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::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 6263E1E09B for ; Mon, 23 Nov 2026 09:46:04 -0500 (EST) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8CDB24539BF8 for ; Mon, 23 Nov 2026 14:46:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8CDB24539BF8 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=XucC1HNk Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id AD91C46BBB70 for ; Mon, 23 Nov 2026 14:45:35 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AD91C46BBB70 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 AD91C46BBB70 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1795445135; cv=none; b=NN1+/yKRrzeaHm6NLezilIa2Dqe7X73Ts0WN0TY4LWJJyK/+fjn7aRDiqxhdxlUiidiVL91EEX/rXxJNe2zUFh24BAcrBsY0ndtZ9pAZ7SPcjZvWVaRUuqJ+GpFse/mmZsaUAVznjAAzINiRkVdH2I6kxzVl8Nkev7fbxQ+f/vc= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1795445135; c=relaxed/simple; bh=1lq1psVYXspoZ0aOeKYWNOSpHUZChymt5S5SCioBbhQ=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=XK7NtSeRQvYe3H6eeHHjMAN8Ky+m3BE+/5e8EpgcSOHIx+XUtMHapPiEkAwkDZRfDIfHFAg/kMafYrd5yaBUvMYzJkE6R02B0m0oqU5aw7TV8oZ/CmyzuZrBRz/+94NAKhPhIf9ccr2jOKfA+udWc0F+FcRA/wHxZ72ODyNZJ6Q= 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=XucC1HNk DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org AD91C46BBB70 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1795445135; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=n4f+MqckCnHca7k/vBGUfKRyitM4B3SBGV+GYnr3yAs=; b=XucC1HNkbLezNJabPF7CT9SaInfG3LgEfKWX8nCGukx6BrXHVZTkXHF8Drl8LvlnoHRtgX sKun+DMTlWySXeQQ8YJ3212N7VeMw+8LBeltDF2HMenDe5B/cCbIU/TBhL00lN7lOlnXX5 FceceZ33C9whp33exZ1WshoZPpbOr9g= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-460-7_UntRLmOlyRoMfMD4zqBQ-1; Mon, 23 Nov 2026 14:45:32 +0000 X-MC-Unique: 7_UntRLmOlyRoMfMD4zqBQ-1 X-Mimecast-MFC-AGG-ID: 7_UntRLmOlyRoMfMD4zqBQ_1795445131 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-4ab341c0696so959487f8f.0 for ; Mon, 23 Nov 2026 06:45:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1795445131; x=1796049931; h=content-type:mime-version:message-id:date:references:in-reply-to :subject:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=n4f+MqckCnHca7k/vBGUfKRyitM4B3SBGV+GYnr3yAs=; b=S5SU8qXJd2jOuZ4yxAhYun0tJRzzbiSwK275CgnIUQlxK0pBVR/4JwH6pKlk9zh1Kt x8dE/mpVEUxgeKsbVQ1MrjnEZsrI+URYyTt87KEwn//Ujw/BDIHu2VH3/mzn4ggcH1LY hCizskrRlQgfO3FB4sizNln+0moojhfZH8ke01oxYG5Yq3rDXGywA8iGh9zJ2jAMeERO PSTFO7CNQ0GsUpeUr5VQvScP13INiR1HNNVzUz2wM77GaZ1T7pVUJaKaYSGC366geghu caA9QUNc8BzxLq77S0bh68Ufb8uf5rGXZ7ArM6KHPmhkrq4NJKXY82E3Yr2pInO4+DUf +nWg== X-Forwarded-Encrypted: i=1; AL+hErHHh3C5o2rDgTQCklLeNN42jAgiPsqXnBExExnPwH22uzbjxdCir5oVYSCoA7gKdZ3W7gWcBn1whbMhXA==@sourceware.org X-Gm-Message-State: APuU4Z+7C+E70i7vwX5F4LAIS16sJCN2IyzTimu46tQkSjsK6/hxU69Y oRWlLKct8Sw3LDtPFPE+E62QDnB/YRIbkrs9/3RnkHru83/JA+7TFYSQBXV4EJwz1DMBuTXqIf6 8N0NBnsUFGnmKiYPGfpzu3rqIfskGQeCRss+Em9apHEo2/s8tNZ4ImSyCpZC9OZw= X-Gm-Gg: AZFdTZd2ecx1Xvj4WVfijXv5B4wKRvEpvh4VegIj5c8kUJ8tt8A10kbmC7r90rShDp8 bfaFtDI7ilRPW2WRq8DTrE5Yn9JvdV6fq/Qd64myHaYjHRgrRKGMmcFt5yNmwJJG/1r79Ew1IoO j5QldgO0mfMVRDdVnQrfGBnz7zfdwkRtZjRlth647Wkxj1ZG/ZCsMN8CD5PG+dJ3pnpHWCQDh34 JA7yZ7RM/bukv5cNA18ay5KM8LBToKUphyMgwk5KMXZeEoOAIVnik8CJMivd85Qa/ydk9nJdvKx WMGCV0pvrfERlsXEEyTSMS5mQAss0LtH4hx4VmmcSMPLmxaqQU7CQt1dbw8weI8+qbpsNKmZkGX 0cPQmcCKdomCkB8PZVr3l0AZreoldTUvf69MGd8QElFux5w== X-Received: by 2002:a05:6000:2c13:b0:4a7:9630:7b57 with SMTP id ffacd0b85a97d-4abb43dece6mr22861653f8f.44.1795445130888; Mon, 23 Nov 2026 06:45:30 -0800 (PST) X-Received: by 2002:a05:6000:2c13:b0:4a7:9630:7b57 with SMTP id ffacd0b85a97d-4abb43dece6mr22861583f8f.44.1795445130195; Mon, 23 Nov 2026 06:45:30 -0800 (PST) Received: from localhost ([83.216.138.189]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4ab658e2c8csm23296631f8f.2.2026.11.23.06.45.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Nov 2026 06:45:29 -0800 (PST) From: Andrew Burgess To: Keith Seitz , gdb-patches@sourceware.org Subject: Re: [PATCH] gdbserver: fix memory leak in vRun handling In-Reply-To: References: <1f52ddf6fec78fe15933d75609a09a1fcdc471a5.1795001077.git.aburgess@redhat.com> Date: Mon, 23 Nov 2026 14:45:28 +0000 Message-ID: MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 2nxkjh3qIL33-aVvxwCaMrT7hak54eG4_7sz-4HPjUE_1795445131 X-Mimecast-Originator: redhat.com Content-Type: text/plain 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 Keith Seitz writes: > 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". You are totally correct. I've updated this to check host and target, and pushed this patch. Thanks, Andrew