From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id fiUqBBPlT2q7xgAAWB0awg (envelope-from ) for ; Thu, 09 Jul 2026 14:14:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1783620882; bh=4OncOXxAFNYIo86b1C37bZzTvZz+rOdtU1iQ7OpPiSU=; h=Date:Subject:To:References:From:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=TRUw2Xkqrydh9ii0e5zsXeJh8fR1+uosLRtZ+AOr27DVZsWSdlQcKlFDh4dFYx7YG iOCaIeklhCXxKPRFLdDq9WCKhnNvzHnfaPBY1KZCpzFXERJpdaq9utJPUdfegqNgCa YEfwHo5UF9LA2DKJqzBpgUyWiVsEaRg6gHoK9sFg= Received: by simark.ca (Postfix, from userid 112) id E35A91E098; Thu, 09 Jul 2026 14:14:42 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.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 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=Etm//i7H; dkim-atps=neutral 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 2BED81E070 for ; Thu, 09 Jul 2026 14:14:42 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 14F124BA23F4 for ; Thu, 9 Jul 2026 18:14:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 14F124BA23F4 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=Etm//i7H Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 618F84BA23C9 for ; Thu, 9 Jul 2026 18:14:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 618F84BA23C9 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 618F84BA23C9 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1783620845; cv=none; b=ET6gyFHtl92IbXRWuG1MHr82BtgOrF+grKVUHZDJblDfI3OZOiO7s11N3az2usJe6gIZvZuURg1CW3Gm8tlGQ+H2iw4xN+TSG3JJSd924P1lbiK+XADPi4Wu1JsEKWHqxVHdQLTyJTstcxxERSLc1lw66j00yjDTAkg4oauPZtI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1783620845; c=relaxed/simple; bh=4OncOXxAFNYIo86b1C37bZzTvZz+rOdtU1iQ7OpPiSU=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=SpD8RedIq+4+C/txzPjqeB9e+WsDA7cskhIpQPu8adyAJGDTirNtScXcrimZmF2gThDfSIoX0+QtIjgI9uCTf1Cn1PPaJYe0/nEirdrKYIRpFO31BOan6bnsexKJCrbt4JJXBQfhVCU/OCufM6sZQJcaVIrQWLtccZahBIOWL8g= ARC-Authentication-Results: i=1; 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=Etm//i7H DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 618F84BA23C9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1783620843; bh=4OncOXxAFNYIo86b1C37bZzTvZz+rOdtU1iQ7OpPiSU=; h=Date:Subject:To:References:From:In-Reply-To:From; b=Etm//i7HNg6i97HatgfDX4lWzdF2IzElQqSsddi/oBJslUiVc4IpM0YxkGWjATBuW 5tzlzJQ/nrzL1zNl4MYIU/y0tZ1uujHtAqu2aAyNMU+ByZkU4FH8uEIJw1qEzX55N2 xJGT26PuF59MTFJsj2JHR7OSgFoPfb7ggzk13kww= Received: by simark.ca (Postfix) id 608871E070; Thu, 09 Jul 2026 14:14:03 -0400 (EDT) Message-ID: <9043916e-cf6c-4e37-ba48-b59f8b7db081@simark.ca> Date: Thu, 9 Jul 2026 14:14:02 -0400 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] gdb.base/execl-update-breakpoints.exp: Don't execl forever To: Pedro Alves , gdb-patches@sourceware.org References: <20260709175804.434105-1-pedro@palves.net> Content-Language: en-US From: Simon Marchi In-Reply-To: <20260709175804.434105-1-pedro@palves.net> 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 2026-07-09 13:58, Pedro Alves wrote: > execl-update-breakpoints.c is compiled as both > execl-update-breakpoints1 and execl-update-breakpoints2. > > execl-update-breakpoints1 checks to see if the last character in its > filename is '1', and if so, replace it with '2' and execl the result. > > On Windows, this fails to take into account that the filename may have > an ".exe" extension. The result is that the execl-update-breakpoints1 > executable execs itself forever. > > This patch fixes it by taking the .exe extension into account. > > (Note that neither native Windows nor Cygwin support following execs, > and maybe the testcase will eventually be skipped there, but even > then, if someone enables follow-exec testing there, we'd want it to > handle the .exe extension, so I think it's better to adjust the > testcase than not.) > > Now, on e.g. GNU/Linux, if you run execl-update-breakpoints1 manually, > you'll see that it also execs forever, but this time, what happens is > that execl-update-breakpoints1 execs execl-update-breakpoints2, and > then it's execl-update-breakpoints2 that execs itself forever. There > is no reason for execl-update-breakpoints2 to exec. It's just that > the testcase is assuming that the process is killed when the testcase > is over. It's just cleaner if execl-update-breakpoints1 execs > execl-update-breakpoints2, and then execl-update-breakpoints2 just > cleanly exits. The patch does that too. > > And then, the test program should really be erroring out if neither > '1' nor '2' is found at the tail of the executable. Done too. So the goal is just to have one exec and then exit? Could we just pass a regular argument (argv[1]) instead of tweaking argv[0]? Like the process could be launched without argument at first, and then it execs itself with an argument, and just the presence of that argument would be a flag to say "don't re-exec, just exit". Simon