From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pythonora Nybon Newsgroups: gmane.emacs.bugs Subject: bug#57115: emacs 29 ~commandp~ check function ~find-file~ loop without termination while ~find-file~ is adviced nested up to 20 level Date: Wed, 10 Aug 2022 08:55:09 +0800 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="00000000000060a55b05e5d882b3" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="40896"; mail-complaints-to="usenet@ciao.gmane.io" To: 57115@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 10 14:32:04 2022 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 1oLksV-000AQf-Gz for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Aug 2022 14:32:03 +0200 Original-Received: from localhost ([::1]:53192 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oLksU-0006pA-8A for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 10 Aug 2022 08:32:02 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41970) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLkrW-0006nJ-Ne for bug-gnu-emacs@gnu.org; Wed, 10 Aug 2022 08:31:10 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:57029) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLkrW-0003RM-Cx for bug-gnu-emacs@gnu.org; Wed, 10 Aug 2022 08:31:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oLkrW-00084J-8m for bug-gnu-emacs@gnu.org; Wed, 10 Aug 2022 08:31:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pythonora Nybon Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 10 Aug 2022 12:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 57115 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.166013464330953 (code B ref -1); Wed, 10 Aug 2022 12:31:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Aug 2022 12:30:43 +0000 Original-Received: from localhost ([127.0.0.1]:46757 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLkrC-000838-2u for submit@debbugs.gnu.org; Wed, 10 Aug 2022 08:30:42 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:53436) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oLa0k-0008RJ-QJ for submit@debbugs.gnu.org; Tue, 09 Aug 2022 20:55:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41854) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oLa0k-0003y9-Ki for bug-gnu-emacs@gnu.org; Tue, 09 Aug 2022 20:55:50 -0400 Original-Received: from mail-io1-xd31.google.com ([2607:f8b0:4864:20::d31]:39822) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oLa0i-0005e7-Fc for bug-gnu-emacs@gnu.org; Tue, 09 Aug 2022 20:55:50 -0400 Original-Received: by mail-io1-xd31.google.com with SMTP id i84so10999680ioa.6 for ; Tue, 09 Aug 2022 17:55:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc; bh=EHu19rUOLSnGxQtYXB8/r0tkX1ELs5n4CvU0lU7GJDk=; b=eSw7sB1aQwlz1AbRBf6+lJF+cxpbzFz5Ss1YZAJNR6hzm8IoWCyHHX2NTyyWhoCC0b jgHuqSkYUrZ46ltpQOdp2F756sR9SVs/OJ0FVX/kjuZ8UVksUvsvw3xAy6vTT2/qIRyx gWT70lislA3yCUR9X3hy9oRku0jJtN5giuUgeiot2JDsw+DsM3pa7gehZe8/XHt4fNMu iCr6MbpKvZ99Ug9tj9aw22LZ5fCt9lpXlFTEW1CucUJfuHvPb23SNSxELHNIoyJPmm6k UDz20OiQSL3qwOYafSTjCW6DkME8K9z3zOWrjNGbzVB5ipo4YTiqiq2Z4E/fUIVfFVXQ aagQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc; bh=EHu19rUOLSnGxQtYXB8/r0tkX1ELs5n4CvU0lU7GJDk=; b=O+NUwgKpZeD3sLZUfzPNHXKd0y4eODxG4mvLV9v8F+qKDdGKYNoEqP7XphuvOJJBaQ ytkH7ezvbkPx93FalufzVPHgVxIQRtGpShVOJpFnekq7+lv4efFsshu3EvRgJCHORC2v si8XQNHJ646wOjI4NsglJCr0RZGXgip1hEPTlmGR5Ako7ZSn3tIsSVwYQxvG4MEbx8EF CHeiINBYOUKCGopZ2qPE5ef1eC0OSRoOTiu9VlI1uxzZZNHa9zI12nGsGBBMOvfUulNI 6eQcEqVV/Wj7nBd9g/+Gvt05HQZn7xCiAkypF2qfrRxz7rnpo801U4x2SyXiVp/RpkWM iXrQ== X-Gm-Message-State: ACgBeo1dzAZj/pv/2Ns7MwlPSB+yPK+MlJDKkNNf6/Y713sPo7tp++iA 38rzh5zvJZDKlYBMrDYoxdPmNlE6eknILoQrDOi4HRcIIAwibA== X-Google-Smtp-Source: AA6agR7lCUhY35gy/tZpED9R6g2tK2w56BjYMZkB8Q7O4zENx7IZ4kTHPVCgnHe8OKRr9VgoCzxAgMEarHrpbVykD2Q= X-Received: by 2002:a05:6638:1496:b0:342:873b:a07c with SMTP id j22-20020a056638149600b00342873ba07cmr11424399jak.236.1660092946619; Tue, 09 Aug 2022 17:55:46 -0700 (PDT) Received-SPF: pass client-ip=2607:f8b0:4864:20::d31; envelope-from=bmsac0001@gmail.com; helo=mail-io1-xd31.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 10 Aug 2022 08:30:40 -0400 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" Xref: news.gmane.io gmane.emacs.bugs:239280 Archived-At: --00000000000060a55b05e5d882b3 Content-Type: text/plain; charset="UTF-8" Dear emacs maintenance team: I found a seriously bug in the latest emacs master development branch (i.e. the next-stage emacs 29 version) which may cause seriously compatibility issues for older emacs users, please see the description below: # Description: **NOTE: It's a seriously fatal bug** It seems the new `oclosure` internal API invocation caused this issue since it modified `advice` refers. And there's no problem in emacs-28 and further older versions. This bug will definitely broke the user emacs config compatibility while they update to 29, since many user use **non-side-effects advice** to inject their owns habits into the vanilla emacs specification. I use the `find-file` just as a example but the bug seemly effects on most of the `advice` behaviour covered on others occasions. Reproduce: Insert below snippet as your `init.el` and run with vanilla emacs 29 session. ``` elisp (toggle-debug-on-quit) ;; (toggle-frame-maximized) ;; (package-initialize) (require 'files) (require 'help) (with-temp-message (substitute-command-keys (format "emacs %s is hang of `commandp' loop via advice to `find-file', \ please hint `\\[keyboard-quit]' to see the backtrace." emacs-major-version)) (dotimes (cnt 20) (let ((sym (intern (format "test-advice/cnt-%s" cnt)))) (eval `(progn (defun ,sym (&rest _) nil) (advice-add 'find-file :before ',sym))))) (commandp 'find-file)) ``` # SYSTEM informations ``` In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.17.6) of 2022-07-28 built on HOMEPC. Repository revision: 163424e04b7f75a1655fd263ba4b6d6d4fa880b2 Repository branch: HEAD Windowing system distributor 'The X.Org Foundation', version 11.0.12201003 System Description: Arch Linux Configured using: 'configure --prefix=/usr/local/share/emacs/29.0.50/ --with-mailutils --with-imagemagick' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ IMAGEMAGICK JPEG JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB Important settings: value of $LANG: en_US.UTF-8 locale-coding-system: utf-8-unix Major mode: Lisp Interaction Minor modes in effect: tooltip-mode: t global-eldoc-mode: t eldoc-mode: t show-paren-mode: t electric-indent-mode: t mouse-wheel-mode: t tool-bar-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t line-number-mode: t indent-tabs-mode: t transient-mark-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t Load-path shadows: None found. Features: (shadow sort mail-extr emacsbug message mailcap yank-media puny dired dired-loaddefs rfc822 mml mml-sec password-cache epa derived epg rfc6068 epg-config gnus-util text-property-search time-date subr-x mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-fns radix-tree cl-print byte-opt gv bytecomp byte-compile cconv debug backtrace help-mode find-func cl-loaddefs cl-lib cus-start cus-load rmc iso-transl tooltip eldoc paren electric uniquify ediff-hook vc-hooks lisp-float-type elisp-mode mwheel term/x-win x-win term/common-win x-dnd tool-bar dnd fontset image regexp-opt fringe tabulated-list replace newcomment text-mode lisp-mode prog-mode register page tab-bar menu-bar rfn-eshadow isearch easymenu timer select scroll-bar mouse jit-lock font-lock syntax font-core term/tty-colors frame minibuffer nadvice seq simple cl-generic indonesian philippine cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese eucjp-ms cp51932 hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese composite emoji-zwj charscript charprop case-table epa-hook jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loaddefs faces cus-face macroexp files window text-properties overlay sha1 md5 base64 format env code-pages mule custom widget keymap hashtable-print-readable backquote threads dbusbind inotify lcms2 dynamic-setting system-font-setting font-render-setting cairo move-toolbar gtk x-toolkit xinput2 x multi-tty make-network-process emacs) Memory information: ((conses 16 113315 7232) (symbols 48 7241 0) (strings 32 19051 975) (string-bytes 1 602973) (vectors 16 11955) (vector-slots 8 171420 9118) (floats 8 24 26) (intervals 56 5526 0) (buffers 992 12)) ``` --00000000000060a55b05e5d882b3 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Dear emacs maintenance team:

I found a serious= ly bug in the latest emacs master development branch
(i.e. the next-stag= e emacs 29 version) which may cause seriously
compatibility issues for o= lder emacs users, please see the description
below:

# Description= :

**NOTE: It's a seriously fatal bug**

It seems the new `= oclosure` internal API invocation caused this issue
since it modified `a= dvice` refers.=C2=A0And there's no problem in
emacs-28 and further o= lder versions.

This bug will definitely broke the user emacs config = compatibility
while they update to 29, since many user use **non-side-ef= fects
advice** to inject their owns habits into the vanilla emacs
spe= cification.

I use the `find-file` just as a example but the bug seem= ly effects on
most of the `advice` behaviour covered on others occasions= .

Reproduce:

Insert below snippet as your `init.el` and run w= ith vanilla emacs 29 session.

``` elisp

(toggle-debug-on-quit= )
;; (toggle-frame-maximized)
;; (package-initialize)
(require = 9;files)
(require 'help)
(with-temp-message
=C2=A0 =C2=A0 (sub= stitute-command-keys
=C2=A0 =C2=A0 =C2=A0(format
=C2=A0 =C2=A0 =C2=A0= "emacs %s is hang of `commandp' loop via advice to `find-file'= ;, \
please hint `\\[keyboard-quit]' to see the backtrace."
= =C2=A0 =C2=A0 =C2=A0 emacs-major-version))
=C2=A0 (dotimes (cnt 20)
= =C2=A0 =C2=A0 (let ((sym (intern (format "test-advice/cnt-%s" cnt= ))))
=C2=A0 =C2=A0 =C2=A0 (eval
=C2=A0 =C2=A0 =C2=A0 =C2=A0`(progn=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 (defun ,sym (&rest _)
=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 nil)
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = (advice-add 'find-file :before ',sym)))))
=C2=A0 (commandp '= find-file))

```

# SYSTEM informations

```

In GN= U Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, GTK+ Version
=C2=A03.24.3= 4, cairo version 1.17.6) of 2022-07-28 built on
=C2=A0HOMEPC. Repository= revision:
=C2=A0163424e04b7f75a1655fd263ba4b6d6d4fa880b2 Repository bra= nch: HEAD
=C2=A0Windowing system distributor 'The X.Org Foundation&#= 39;, version
=C2=A011.0.12201003 System Description: Arch Linux

C= onfigured using: 'configure --prefix=3D/usr/local/share/emacs/29.0.50/<= br>=C2=A0--with-mailutils --with-imagemagick'

Configured feature= s: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM
GSETTINGS HARFBUZZ IM= AGEMAGICK JPEG JSON LCMS2 LIBOTF LIBSYSTEMD LIBXML2
M17N_FLT MODULES NOT= IFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3
THREADS TIFF TOOLKIT_= SCROLL_BARS WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB

Important settin= gs: value of $LANG: en_US.UTF-8 locale-coding-system:
=C2=A0 utf-8-unix<= br>
Major mode: Lisp Interaction

Minor modes in effect: tooltip-m= ode: t global-eldoc-mode: t eldoc-mode:
=C2=A0 t show-paren-mode: t elec= tric-indent-mode: t mouse-wheel-mode: t
=C2=A0 tool-bar-mode: t menu-bar= -mode: t file-name-shadow-mode: t
=C2=A0 global-font-lock-mode: t font-l= ock-mode: t blink-cursor-mode: t
=C2=A0 line-number-mode: t indent-tabs-= mode: t transient-mark-mode: t
=C2=A0 auto-composition-mode: t auto-encr= yption-mode: t
=C2=A0 auto-compression-mode: t

Load-path shadows:= None found.

Features: (shadow sort mail-extr emacsbug message mailc= ap yank-media
puny dired dired-loaddefs rfc822 mml mml-sec password-cach= e epa derived
epg rfc6068 epg-config gnus-util text-property-search time= -date subr-x
mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev= gmm-utils
mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-p= rsvr
mail-utils help-fns radix-tree cl-print byte-opt gv bytecomp
byt= e-compile cconv debug backtrace help-mode find-func cl-loaddefs
cl-lib c= us-start cus-load rmc iso-transl tooltip eldoc paren electric
uniquify e= diff-hook vc-hooks lisp-float-type elisp-mode mwheel
term/x-win x-win te= rm/common-win x-dnd tool-bar dnd fontset image
regexp-opt fringe tabulat= ed-list replace newcomment text-mode lisp-mode
prog-mode register page t= ab-bar menu-bar rfn-eshadow isearch easymenu
timer select scroll-bar mou= se jit-lock font-lock syntax font-core
term/tty-colors frame minibuffer = nadvice seq simple cl-generic
indonesian philippine cham georgian utf-8-= lang misc-lang vietnamese
tibetan thai tai-viet lao korean japanese eucj= p-ms cp51932 hebrew greek
romanian slovak czech european ethiopic indian= cyrillic chinese
composite emoji-zwj charscript charprop case-table epa= -hook
jka-cmpr-hook help abbrev obarray oclosure cl-preloaded button loa= ddefs
faces cus-face macroexp files window text-properties overlay sha1 = md5
base64 format env code-pages mule custom widget keymap
hashtable-= print-readable backquote threads dbusbind inotify lcms2
dynamic-setting = system-font-setting font-render-setting cairo
move-toolbar gtk x-toolkit= xinput2 x multi-tty make-network-process
emacs)

Memory informati= on: ((conses 16 113315 7232) (symbols 48 7241 0)
(strings 32 19051 975) = (string-bytes 1 602973) (vectors 16 11955)
(vector-slots 8 171420 9118) = (floats 8 24 26) (intervals 56 5526 0)
(buffers 992 12))

```
<= /div>
--00000000000060a55b05e5d882b3--