From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#59213: Emacs 29: Edebug fails to instrument a parameter whose name begins with _ Date: Tue, 14 Feb 2023 16:47:03 -0500 Message-ID: References: Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1285"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 59213-done@debbugs.gnu.org, Eli Zaretskii To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Feb 14 22:48:29 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pS3A4-00004r-So for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 Feb 2023 22:48:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pS39n-0002F0-5W; Tue, 14 Feb 2023 16:48:12 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pS39e-0002Ah-JX for bug-gnu-emacs@gnu.org; Tue, 14 Feb 2023 16:48:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pS39e-0004DF-An for bug-gnu-emacs@gnu.org; Tue, 14 Feb 2023 16:48:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pS39d-0007PR-O9 for bug-gnu-emacs@gnu.org; Tue, 14 Feb 2023 16:48:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Feb 2023 21:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 59213 X-GNU-PR-Package: emacs Original-Received: via spool by 59213-done@debbugs.gnu.org id=D59213.167641123328255 (code D ref 59213); Tue, 14 Feb 2023 21:48:01 +0000 Original-Received: (at 59213-done) by debbugs.gnu.org; 14 Feb 2023 21:47:13 +0000 Original-Received: from localhost ([127.0.0.1]:57222 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pS38r-0007Lf-EV for submit@debbugs.gnu.org; Tue, 14 Feb 2023 16:47:13 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:53667) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pS38p-0007LS-Gc for 59213-done@debbugs.gnu.org; Tue, 14 Feb 2023 16:47:11 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 14C5710002F; Tue, 14 Feb 2023 16:47:06 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 9E31A10001C; Tue, 14 Feb 2023 16:47:04 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1676411224; bh=fkgQ+wxmHm58ag1qiDb5qrNnr+DSg8QBi31MXmsXL6c=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=HddywaIRqI105voZTuZjFfgYrdgk1ma5GT37Ptso5lBW1k5M/QeeZCz9EhZ3bMqcS HnGleQtCbE+EkTUphWPmbsprg7z7UQknkN5rzcnhLi41O+YAlFaXIfq7DsG9u6iX1R RBo0rto4XfU9R7V5w3DIYgdmiCrRG/2rxowwzopmeuaIkrqvFWKdM15RQLE0TgrvAV sQTxeqdn+VmQMnIN1njN+fxiX4+XAp5zI9BPtsRCt/I/75ZE3/S2klQbj7LmLd5flp a7UEduu/zIbdhUBWo9UIaRCmqf9ZenEjVxYYixorRQfEVJFFbHBDrnbXn4o/f7w0bH wU+LD+mM76vkA== Original-Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8BF8B12305D; Tue, 14 Feb 2023 16:47:04 -0500 (EST) In-Reply-To: (Alan Mackenzie's message of "Sat, 11 Feb 2023 11:17:24 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:255638 Archived-At: >> (function (lambda () ,@forms)) >> with >> (function (lambda () :closure-dont-trim-context ,@forms)) >> and then have `cconv-make-interpreted-closure` look for this >> tell-tale sign. > Interesting. Isn't there a good chance this would foul up programs which > analyse the structure of a closure? It's possible, indeed. Such programs should be quite rare, tho. I'd expect packages which analyse such code would either: A) be Edebug-specific and would have to handle any values of `forms`, in which case having `:closure-dont-trim-context` prepended to it would not affect them. B) be non-Edebug specific in which case they should be looking for a specific pattern somewhere inside `forms` and they should presumably not find the above transformation worse than the other transformations applied by Edebug in general. > (A bit like testcover-analyze-coverage analyses the calling structure > of edebug-enter). Indeed, it's only such code I have found so far. I know there are other tools out there that use Edebug's instrumentation in creative ways, but I can't remember where they are. And, AFAICT in the case of `testcover.el`, the above suggestion would "just work" (fall into case (A)) whereas your approach required a tweak. I'll try it on `master`. Stefan