From unknown Mon Jun 23 04:08:23 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#21083 <21083@debbugs.gnu.org> To: bug#21083 <21083@debbugs.gnu.org> Subject: Status: 24.5; Infinite loop in called-interactively-p Reply-To: bug#21083 <21083@debbugs.gnu.org> Date: Mon, 23 Jun 2025 11:08:23 +0000 retitle 21083 24.5; Infinite loop in called-interactively-p reassign 21083 emacs submitter 21083 Dmitri Paduchikh severity 21083 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Jul 17 23:48:57 2015 Received: (at submit) by debbugs.gnu.org; 18 Jul 2015 03:48:57 +0000 Received: from localhost ([127.0.0.1]:52381 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZGJ7P-0003jr-Ap for submit@debbugs.gnu.org; Fri, 17 Jul 2015 23:48:56 -0400 Received: from eggs.gnu.org ([208.118.235.92]:57672) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZGJ7K-0003ja-UB for submit@debbugs.gnu.org; Fri, 17 Jul 2015 23:48:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZGJ7C-0004u9-Oa for submit@debbugs.gnu.org; Fri, 17 Jul 2015 23:48:45 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50,FREEMAIL_FROM, FSL_HELO_FAKE,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:57555) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGJ7C-0004u4-Kz for submit@debbugs.gnu.org; Fri, 17 Jul 2015 23:48:42 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42931) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGJ79-0003NY-GO for bug-gnu-emacs@gnu.org; Fri, 17 Jul 2015 23:48:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZGJ74-0004tN-Dm for bug-gnu-emacs@gnu.org; Fri, 17 Jul 2015 23:48:39 -0400 Received: from mail-lb0-x232.google.com ([2a00:1450:4010:c04::232]:36130) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGJ73-0004tH-QN for bug-gnu-emacs@gnu.org; Fri, 17 Jul 2015 23:48:34 -0400 Received: by lbbpo10 with SMTP id po10so70041087lbb.3 for ; Fri, 17 Jul 2015 20:48:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; bh=tC6oD8HMAB//xXifXgxtrm+jf9YY0Q5MPpwzIC2vTFQ=; b=q6ozXZy6kYExURRwjOZgtFSwIaVs+GJqYOnvvem6uNEKy6v+M7FurN8QDuKB9V3GlR RRsgZNOaln8vuGgO5zJoIObFXIXDP44Jk1v7EjHmvI2/O1atg6+MpwirF0YYtOi/I+8B Vr5Gq0kS94g66Rdt/zgQHhNX5JN+97ld4TXoSWol5d6XyJD5ZNvJQ0E/yICGx1JgLnBQ 1NhSkWWALzUWqO6CkRd4CQj33PN+Pu/zihlEsLwpxPQBYoI3XBKRErAqt5uepSnhT3go f9tpJOd/GRJPA+actLOHQKQLixbTjtLZ8rJFqpwUufHrP4CacqJWd5xoA3OB6qz4XY3d PB+g== X-Received: by 10.112.144.69 with SMTP id sk5mr17433008lbb.6.1437191312952; Fri, 17 Jul 2015 20:48:32 -0700 (PDT) Received: from gmail.com ([46.48.49.226]) by smtp.gmail.com with ESMTPSA id w7sm3332414lag.42.2015.07.17.20.48.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Jul 2015 20:48:32 -0700 (PDT) From: Dmitri Paduchikh To: bug-gnu-emacs@gnu.org Subject: 24.5; Infinite loop in called-interactively-p Date: Sat, 18 Jul 2015 08:48:31 +0500 Message-ID: <87fv4mrur4.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.0 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.0 (----) --=-=-= Content-Type: text/plain Hello, I have prepared a simple example to reproduce the problem. In the attachment is a small elisp file testfile.el. Save it and execute: emacs -q -l testfile.el In the started Emacs open some shell script and press TAB. Observe infinite loop running inside advice--called-interactively-skip. I have pressed TAB on an empty line, though probably any other will work as well. Debugger entered--Lisp error: (quit) funcall((closure ((i . 11809182) (frame2) (frame1) (origi . 3) t) nil (setq frame1 frame2) (setq frame2 (backtrace-frame i (function called-interactively-p))) (setq i (1+ i)))) (progn (funcall get-next-frame) (not (and (eq (nth 1 frame2) (quote apply)) (eq (nth 3 frame2) inneradvice)))) (while (progn (funcall get-next-frame) (not (and (eq (nth 1 frame2) (quote apply)) (eq (nth 3 frame2) inneradvice))))) (if (and (eq (nth 1 frame2) (quote apply)) (progn (funcall get-next-frame) (advice--p (indirect-function (nth 1 frame2))))) (funcall get-next-frame) (while (progn (funcall get-next-frame) (not (and (eq (nth 1 frame2) (quote apply)) (eq (nth 3 frame2) inneradvice))))) (funcall get-next-frame) (funcall get-next-frame)) (let ((inneradvice (nth 1 frame1))) (if (and (eq (nth 1 frame2) (quote apply)) (progn (funcall get-next-frame) (advice--p (indirect-function (nth 1 frame2))))) (funcall get-next-frame) (while (progn (funcall get-next-frame) (not (and (eq (nth 1 frame2) (quote apply)) (eq (nth 3 frame2) inneradvice))))) (funcall get-next-frame) (funcall get-next-frame))) (while (advice--p (nth 1 frame1)) (let ((inneradvice (nth 1 frame1))) (if (and (eq (nth 1 frame2) (quote apply)) (progn (funcall get-next-frame) (advice--p (indirect-function (nth 1 frame2))))) (funcall get-next-frame) (while (progn (funcall get-next-frame) (not (and (eq ... ...) (eq ... inneradvice))))) (funcall get-next-frame) (funcall get-next-frame)))) (progn (funcall get-next-frame) (while (advice--p (nth 1 frame1)) (let ((inneradvice (nth 1 frame1))) (if (and (eq (nth 1 frame2) (quote apply)) (progn (funcall get-next-frame) (advice--p (indirect-function ...)))) (funcall get-next-frame) (while (progn (funcall get-next-frame) (not (and ... ...)))) (funcall get-next-frame) (funcall get-next-frame)))) (- i origi 1)) (if (and (eq (nth 1 frame2) (quote apply)) (progn (funcall get-next-frame) (advice--p (indirect-function (nth 1 frame2))))) (progn (funcall get-next-frame) (while (advice--p (nth 1 frame1)) (let ((inneradvice (nth 1 frame1))) (if (and (eq (nth 1 frame2) (quote apply)) (progn (funcall get-next-frame) (advice--p ...))) (funcall get-next-frame) (while (progn (funcall get-next-frame) (not ...))) (funcall get-next-frame) (funcall get-next-frame)))) (- i origi 1))) (let* ((i origi) (get-next-frame (function (lambda nil (setq frame1 frame2) (setq frame2 (backtrace-frame i (function called-interactively-p))) (setq i (1+ i)))))) (if (and (eq (nth 1 frame2) (quote apply)) (progn (funcall get-next-frame) (advice--p (indirect-function (nth 1 frame2))))) (progn (funcall get-next-frame) (while (advice--p (nth 1 frame1)) (let ((inneradvice (nth 1 frame1))) (if (and (eq ... ...) (progn ... ...)) (funcall get-next-frame) (while (progn ... ...)) (funcall get-next-frame) (funcall get-next-frame)))) (- i origi 1)))) advice--called-interactively-skip(3 (t ad-Advice-backward-sexp #[256 "\211\204.\300\262.\301.[!\207" [1 forward-sexp] 3 2389807 "^p"] 1) (t apply ad-Advice-backward-sexp #[256 "\211\204.\300\262.\301.[!\207" [1 forward-sexp] 3 2389807 "^p"] 1)) run-hook-with-args-until-success(advice--called-interactively-skip 3 (t ad-Advice-backward-sexp #[256 "\211\204.\300\262.\301.[!\207" [1 forward-sexp] 3 2389807 "^p"] 1) (t apply ad-Advice-backward-sexp #[256 "\211\204.\300\262.\301.[!\207" [1 forward-sexp] 3 2389807 "^p"] 1)) called-interactively-p(interactive) ad-Advice-backward-sexp(#[256 "\211\204.\300\262.\301.[!\207" [1 forward-sexp] 3 2389807 "^p"] 1) apply(ad-Advice-backward-sexp #[256 "\211\204.\300\262.\301.[!\207" [1 forward-sexp] 3 2389807 "^p"] 1) #[128 "\300\301\302.#\207" [apply ad-Advice-backward-sexp #[256 "\211\204.\300\262.\301.[!\207" [1 forward-sexp] 3 2389807 "^p"] nil] 5 nil "^p"](1) #[0 "\300\301!\210\302\207" [#[128 "\300\301\302.#\207" [apply ad-Advice-backward-sexp #[256 "\211\204.\300\262.\301.[!\207" [1 forward-sexp] 3 2389807 "^p"] nil] 5 nil "^p"] 1 nil] 2 "\n\n(fn)"]() funcall(#[0 "\300\301!\210\302\207" [#[128 "\300\301\302.#\207" [apply ad-Advice-backward-sexp #[256 "\211\204.\300\262.\301.[!\207" [1 forward-sexp] 3 2389807 "^p"] nil] 5 nil "^p"] 1 nil] 2 "\n\n(fn)"]) #[0 "\304\242;\205..\306\304\242.\"AC\304\307\240\210`\300 \306. \"A\211\204X.\310.G!\203$.\311\312\313\314\315\316\317\301!\320\"\321\322%D\323\312\313\324\325\316\317. !\326\"\327\330%\311EDC\217\210.`=\203$.\331\332\333`D\"\210\202$.\303.!\247\204t.\302.!\247\204l.\334\335\336C\"\210\211.B\262.\202$..\203\212.\303.!\302.@!W\203\212..A\262.\202t..\204\266.\304\242\203\242.\302.!\247\203\242.\211.B\262.\202$.\331\332\302.!\206\253.\333`.E.b\210\"\210\202$..\211\203\313.\303.!\302..@!U\203\313..A\262..\203\336.\302.!\247\203#...B\262.\202#.\302.!\247\204\361.\331\332\307`..E\"\210\202#.\337.!\204\377...B\262.\202#.\211\203 .\337.@!\203 .\331\332\302.!\206..\333`..E..b\210\"\210\202#.\211\262.\210.\266\203\2051.\304\307\240\210\202..\207" [#[0 "\304 \305`[!\210n\203*.o\204*.\306`S!\307\232\203*.\310\311 8\204*.\312.\313\314!\210)\315\202\225.`.W\203K.\316 \203=.\314u\210 \202\225.\317 \203F.\315\202\225. \202\225.\320\n\304 \321#\203^.\322\224b\210\323\322!\202\225.\324 \211\325\232\203j.\326\202\223.\211\327\232\203t.\330\202\223.\211\203\222.\331\332.\"\203\222.\333. \"\203\222.\212\334.!)\204\222.\335\202\223.\211\262.\207" [forward-sexp-function smie-backward-token-function sh-smie--sh-operators-back-re smie-grammar line-beginning-position forward-comment syntax-after (15) 3 syntax-ppss nil forward-sexp -1 ";" sh-smie--looking-back-at-continuation-p sh-smie--newline-semi-p looking-back greedy 1 match-string-no-properties sh-smie--default-backward-token ")" "case-)" "(" "case-(" string-match "\\`[a-z]" assoc sh-smie--sh-keyword-p " word "] 5 "\n\n(fn)"] #[128 "\300\301\302.#\207" [apply ad-Advice-backward-sexp #[256 "\211\204.\300\262.\301.[!\207" [1 forward-sexp] 3 2389807 "^p"] nil] 5 nil "^p"] # #[257 "\211A@\207" [] 2 1636664] (halfsexp) smie-grammar assoc nil zerop err funcall make-byte-code 0 "\300\301!\210\302\207" vconcat vector [1 nil] 2 "\n\n(fn)" scan-error 257 "\301.8`.X\203..\302.8\202..\211\300b\210\303\304\305.\306.\211`.W\203%.\307\202&.\310\\\"E\"\207" [2 3 throw return t buffer-substring-no-properties -1 1] 12 "\n\n(fn ERR)" throw return t signal cl-assertion-failed (numberp (funcall op-forw toklevels)) smie--associative-p] 14 "\n\n(fn)"]() funcall(#[0 "\304\242;\205..\306\304\242.\"AC\304\307\240\210`\300 \306. \"A\211\204X.\310.G!\203$.\311\312\313\314\315\316\317\301!\320\"\321\322%D\323\312\313\324\325\316\317. !\326\"\327\330%\311EDC\217\210.`=\203$.\331\332\333`D\"\210\202$.\303.!\247\204t.\302.!\247\204l.\334\335\336C\"\210\211.B\262.\202$..\203\212.\303.!\302.@!W\203\212..A\262.\202t..\204\266.\304\242\203\242.\302.!\247\203\242.\211.B\262.\202$.\331\332\302.!\206\253.\333`.E.b\210\"\210\202$..\211\203\313.\303.!\302..@!U\203\313..A\262..\203\336.\302.!\247\203#...B\262.\202#.\302.!\247\204\361.\331\332\307`..E\"\210\202#.\337.!\204\377...B\262.\202#.\211\203 .\337.@!\203 .\331\332\302.!\206..\333`..E..b\210\"\210\202#.\211\262.\210.\266\203\2051.\304\307\240\210\202..\207" [#[0 "\304 \305`[!\210n\203*.o\204*.\306`S!\307\232\203*.\310\311 8\204*.\312.\313\314!\210)\315\202\225.`.W\203K.\316 \203=.\314u\210 \202\225.\317 \203F.\315\202\225. \202\225.\320\n\304 \321#\203^.\322\224b\210\323\322!\202\225.\324 \211\325\232\203j.\326\202\223.\211\327\232\203t.\330\202\223.\211\203\222.\331\332.\"\203\222.\333. \"\203\222.\212\334.!)\204\222.\335\202\223.\211\262.\207" [forward-sexp-function smie-backward-token-function sh-smie--sh-operators-back-re smie-grammar line-beginning-position forward-comment syntax-after (15) 3 syntax-ppss nil forward-sexp -1 ";" sh-smie--looking-back-at-continuation-p sh-smie--newline-semi-p looking-back greedy 1 match-string-no-properties sh-smie--default-backward-token ")" "case-)" "(" "case-(" string-match "\\`[a-z]" assoc sh-smie--sh-keyword-p " word "] 5 "\n\n(fn)"] #[128 "\300\301\302.#\207" [apply ad-Advice-backward-sexp #[256 "\211\204.\300\262.\301.[!\207" [1 forward-sexp] 3 2389807 "^p"] nil] 5 nil "^p"] # #[257 "\211A@\207" [] 2 1636664] (halfsexp) smie-grammar assoc nil zerop err funcall make-byte-code 0 "\300\301!\210\302\207" vconcat vector [1 nil] 2 "\n\n(fn)" scan-error 257 "\301.8`.X\203..\302.8\202..\211\300b\210\303\304\305.\306.\211`.W\203%.\307\202&.\310\\\"E\"\207" [2 3 throw return t buffer-substring-no-properties -1 1] 12 "\n\n(fn ERR)" throw return t signal cl-assertion-failed (numberp (funcall op-forw toklevels)) smie--associative-p] 14 "\n\n(fn)"]) smie-next-sexp(#[0 "\304 \305`[!\210n\203*.o\204*.\306`S!\307\232\203*.\310\311 8\204*.\312.\313\314!\210)\315\202\225.`.W\203K.\316 \203=.\314u\210 \202\225.\317 \203F.\315\202\225. \202\225.\320\n\304 \321#\203^.\322\224b\210\323\322!\202\225.\324 \211\325\232\203j.\326\202\223.\211\327\232\203t.\330\202\223.\211\203\222.\331\332.\"\203\222.\333. \"\203\222.\212\334.!)\204\222.\335\202\223.\211\262.\207" [forward-sexp-function smie-backward-token-function sh-smie--sh-operators-back-re smie-grammar line-beginning-position forward-comment syntax-after (15) 3 syntax-ppss nil forward-sexp -1 ";" sh-smie--looking-back-at-continuation-p sh-smie--newline-semi-p looking-back greedy 1 match-string-no-properties sh-smie--default-backward-token ")" "case-)" "(" "case-(" string-match "\\`[a-z]" assoc sh-smie--sh-keyword-p " word "] 5 "\n\n(fn)"] #[128 "\300\301\302.#\207" [apply ad-Advice-backward-sexp #[256 "\211\204.\300\262.\301.[!\207" [1 forward-sexp] 3 2389807 "^p"] nil] 5 nil "^p"] # #[257 "\211A@\207" [] 2 1636664] halfsexp) smie-backward-sexp(halfsexp) smie-forward-sexp-command(-1) #[256 "\211\204.\301\262.\203...!\207\302`.\"\206..\303.!b\210\211\304W\205#.\305 \207" [forward-sexp-function 1 scan-sexps buffer-end 0 backward-prefix-chars] 4 2389495 "^p"](-1) ad-Advice-forward-sexp(#[256 "\211\204.\301\262.\203...!\207\302`.\"\206..\303.!b\210\211\304W\205#.\305 \207" [forward-sexp-function 1 scan-sexps buffer-end 0 backward-prefix-chars] 4 2389495 "^p"] -1) apply(ad-Advice-forward-sexp #[256 "\211\204.\301\262.\203...!\207\302`.\"\206..\303.!b\210\211\304W\205#.\305 \207" [forward-sexp-function 1 scan-sexps buffer-end 0 backward-prefix-chars] 4 2389495 "^p"] -1) forward-sexp(-1) #[256 "\211\204.\300\262.\301.[!\207" [1 forward-sexp] 3 2389807 "^p"](1) ad-Advice-backward-sexp(#[256 "\211\204.\300\262.\301.[!\207" [1 forward-sexp] 3 2389807 "^p"] 1) apply(ad-Advice-backward-sexp #[256 "\211\204.\300\262.\301.[!\207" [1 forward-sexp] 3 2389807 "^p"] 1) #[128 "\300\301\302.#\207" [apply ad-Advice-backward-sexp #[256 "\211\204.\300\262.\301.[!\207" [1 forward-sexp] 3 2389807 "^p"] nil] 5 nil "^p"](1) #[0 "\300\301!\210\302\207" [#[128 "\300\301\302.#\207" [apply ad-Advice-backward-sexp #[256 "\211\204.\300\262.\301.[!\207" [1 forward-sexp] 3 2389807 "^p"] nil] 5 nil "^p"] 1 nil] 2 "\n\n(fn)"]() funcall(#[0 "\300\301!\210\302\207" [#[128 "\300\301\302.#\207" [apply ad-Advice-backward-sexp #[256 "\211\204.\300\262.\301.[!\207" [1 forward-sexp] 3 2389807 "^p"] nil] 5 nil "^p"] 1 nil] 2 "\n\n(fn)"]) #[0 "\304\242;\205..\306\304\242.\"AC\304\307\240\210`\300 \306. \"A\211\204X.\310.G!\203$.\311\312\313\314\315\316\317\301!\320\"\321\322%D\323\312\313\324\325\316\317. !\326\"\327\330%\311EDC\217\210.`=\203$.\331\332\333`D\"\210\202$.\303.!\247\204t.\302.!\247\204l.\334\335\336C\"\210\211.B\262.\202$..\203\212.\303.!\302.@!W\203\212..A\262.\202t..\204\266.\304\242\203\242.\302.!\247\203\242.\211.B\262.\202$.\331\332\302.!\206\253.\333`.E.b\210\"\210\202$..\211\203\313.\303.!\302..@!U\203\313..A\262..\203\336.\302.!\247\203#...B\262.\202#.\302.!\247\204\361.\331\332\307`..E\"\210\202#.\337.!\204\377...B\262.\202#.\211\203 .\337.@!\203 .\331\332\302.!\206..\333`..E..b\210\"\210\202#.\211\262.\210.\266\203\2051.\304\307\240\210\202..\207" [#[0 "\304 \305`[!\210n\203*.o\204*.\306`S!\307\232\203*.\310\311 8\204*.\312.\313\314!\210)\315\202\225.`.W\203K.\316 \203=.\314u\210 \202\225.\317 \203F.\315\202\225. \202\225.\320\n\304 \321#\203^.\322\224b\210\323\322!\202\225.\324 \211\325\232\203j.\326\202\223.\211\327\232\203t.\330\202\223.\211\203\222.\331\332.\"\203\222.\333. \"\203\222.\212\334.!)\204\222.\335\202\223.\211\262.\207" [forward-sexp-function smie-backward-token-function sh-smie--sh-operators-back-re smie-grammar line-beginning-position forward-comment syntax-after (15) 3 syntax-ppss nil forward-sexp -1 ";" sh-smie--looking-back-at-continuation-p sh-smie--newline-semi-p looking-back greedy 1 match-string-no-properties sh-smie--default-backward-token ")" "case-)" "(" "case-(" string-match "\\`[a-z]" assoc sh-smie--sh-keyword-p " word "] 5 "\n\n(fn)"] #[128 "\300\301\302.#\207" [apply ad-Advice-backward-sexp #[256 "\211\204.\300\262.\301.[!\207" [1 forward-sexp] 3 2389807 "^p"] nil] 5 nil "^p"] # #[257 "\211A@\207" [] 2 1636664] (nil) smie-grammar assoc nil zerop err funcall make-byte-code 0 "\300\301!\210\302\207" vconcat vector [1 nil] 2 "\n\n(fn)" scan-error 257 "\301.8`.X\203..\302.8\202..\211\300b\210\303\304\305.\306.\211`.W\203%.\307\202&.\310\\\"E\"\207" [2 3 throw return t buffer-substring-no-properties -1 1] 12 "\n\n(fn ERR)" throw return t signal cl-assertion-failed (numberp (funcall op-forw toklevels)) smie--associative-p] 14 "\n\n(fn)"]() funcall(#[0 "\304\242;\205..\306\304\242.\"AC\304\307\240\210`\300 \306. \"A\211\204X.\310.G!\203$.\311\312\313\314\315\316\317\301!\320\"\321\322%D\323\312\313\324\325\316\317. !\326\"\327\330%\311EDC\217\210.`=\203$.\331\332\333`D\"\210\202$.\303.!\247\204t.\302.!\247\204l.\334\335\336C\"\210\211.B\262.\202$..\203\212.\303.!\302.@!W\203\212..A\262.\202t..\204\266.\304\242\203\242.\302.!\247\203\242.\211.B\262.\202$.\331\332\302.!\206\253.\333`.E.b\210\"\210\202$..\211\203\313.\303.!\302..@!U\203\313..A\262..\203\336.\302.!\247\203#...B\262.\202#.\302.!\247\204\361.\331\332\307`..E\"\210\202#.\337.!\204\377...B\262.\202#.\211\203 .\337.@!\203 .\331\332\302.!\206..\333`..E..b\210\"\210\202#.\211\262.\210.\266\203\2051.\304\307\240\210\202..\207" [#[0 "\304 \305`[!\210n\203*.o\204*.\306`S!\307\232\203*.\310\311 8\204*.\312.\313\314!\210)\315\202\225.`.W\203K.\316 \203=.\314u\210 \202\225.\317 \203F.\315\202\225. \202\225.\320\n\304 \321#\203^.\322\224b\210\323\322!\202\225.\324 \211\325\232\203j.\326\202\223.\211\327\232\203t.\330\202\223.\211\203\222.\331\332.\"\203\222.\333. \"\203\222.\212\334.!)\204\222.\335\202\223.\211\262.\207" [forward-sexp-function smie-backward-token-function sh-smie--sh-operators-back-re smie-grammar line-beginning-position forward-comment syntax-after (15) 3 syntax-ppss nil forward-sexp -1 ";" sh-smie--looking-back-at-continuation-p sh-smie--newline-semi-p looking-back greedy 1 match-string-no-properties sh-smie--default-backward-token ")" "case-)" "(" "case-(" string-match "\\`[a-z]" assoc sh-smie--sh-keyword-p " word "] 5 "\n\n(fn)"] #[128 "\300\301\302.#\207" [apply ad-Advice-backward-sexp #[256 "\211\204.\300\262.\301.[!\207" [1 forward-sexp] 3 2389807 "^p"] nil] 5 nil "^p"] # #[257 "\211A@\207" [] 2 1636664] (nil) smie-grammar assoc nil zerop err funcall make-byte-code 0 "\300\301!\210\302\207" vconcat vector [1 nil] 2 "\n\n(fn)" scan-error 257 "\301.8`.X\203..\302.8\202..\211\300b\210\303\304\305.\306.\211`.W\203%.\307\202&.\310\\\"E\"\207" [2 3 throw return t buffer-substring-no-properties -1 1] 12 "\n\n(fn ERR)" throw return t signal cl-assertion-failed (numberp (funcall op-forw toklevels)) smie--associative-p] 14 "\n\n(fn)"]) smie-next-sexp(#[0 "\304 \305`[!\210n\203*.o\204*.\306`S!\307\232\203*.\310\311 8\204*.\312.\313\314!\210)\315\202\225.`.W\203K.\316 \203=.\314u\210 \202\225.\317 \203F.\315\202\225. \202\225.\320\n\304 \321#\203^.\322\224b\210\323\322!\202\225.\324 \211\325\232\203j.\326\202\223.\211\327\232\203t.\330\202\223.\211\203\222.\331\332.\"\203\222.\333. \"\203\222.\212\334.!)\204\222.\335\202\223.\211\262.\207" [forward-sexp-function smie-backward-token-function sh-smie--sh-operators-back-re smie-grammar line-beginning-position forward-comment syntax-after (15) 3 syntax-ppss nil forward-sexp -1 ";" sh-smie--looking-back-at-continuation-p sh-smie--newline-semi-p looking-back greedy 1 match-string-no-properties sh-smie--default-backward-token ")" "case-)" "(" "case-(" string-match "\\`[a-z]" assoc sh-smie--sh-keyword-p " word "] 5 "\n\n(fn)"] #[128 "\300\301\302.#\207" [apply ad-Advice-backward-sexp #[256 "\211\204.\300\262.\301.[!\207" [1 forward-sexp] 3 2389807 "^p"] nil] 5 nil "^p"] # #[257 "\211A@\207" [] 2 1636664] ";") smie-backward-sexp(";") smie-indent-keyword() run-hook-with-args-until-success(smie-indent-keyword) smie-indent-calculate() smie-indent-virtual() smie-indent-after-keyword() run-hook-with-args-until-success(smie-indent-after-keyword) smie-indent-calculate() #[0 "\212\301y\210\302\303w\210`\300\242Y\203..\300\303\240\210\304 \206..\301)\207" [(941) 0 " " nil smie-indent-calculate] 2 "\n\n(fn)"]() funcall(#[0 "\212\301y\210\302\303w\210`\300\242Y\203..\300\303\240\210\304 \206..\301)\207" [(941) 0 " " nil smie-indent-calculate] 2 "\n\n(fn)"]) smie-indent-line() #[256 "\304 \203\f.\305\306 \307 \"\207\310=\204#. \204'.i\311 V\204#.\n =\203'.\312.!\207\313 `\311  \210 \314=\203G..`=\203G..\313 =\203G.\315 \202r..\205r.\212\316y\210\317 \210\320 )\311 .Z\212\321y\210\322.!?\205o.`.W\205o.\323`..#)\266\202\207" [indent-line-function tab-always-indent this-command last-command use-region-p indent-region region-beginning region-end indent-to-left-margin current-indentation insert-tab buffer-chars-modified-tick complete completion-at-point 0 forward-sexp point-marker 1 zerop indent-rigidly] 10 2133678 "P"](nil) ad-Advice-indent-for-tab-command(#[256 "\304 \203\f.\305\306 \307 \"\207\310=\204#. \204'.i\311 V\204#.\n =\203'.\312.!\207\313 `\311  \210 \314=\203G..`=\203G..\313 =\203G.\315 \202r..\205r.\212\316y\210\317 \210\320 )\311 .Z\212\321y\210\322.!?\205o.`.W\205o.\323`..#)\266\202\207" [indent-line-function tab-always-indent this-command last-command use-region-p indent-region region-beginning region-end indent-to-left-margin current-indentation insert-tab buffer-chars-modified-tick complete completion-at-point 0 forward-sexp point-marker 1 zerop indent-rigidly] 10 2133678 "P"] nil) apply(ad-Advice-indent-for-tab-command #[256 "\304 \203\f.\305\306 \307 \"\207\310=\204#. \204'.i\311 V\204#.\n =\203'.\312.!\207\313 `\311  \210 \314=\203G..`=\203G..\313 =\203G.\315 \202r..\205r.\212\316y\210\317 \210\320 )\311 .Z\212\321y\210\322.!?\205o.`.W\205o.\323`..#)\266\202\207" [indent-line-function tab-always-indent this-command last-command use-region-p indent-region region-beginning region-end indent-to-left-margin current-indentation insert-tab buffer-chars-modified-tick complete completion-at-point 0 forward-sexp point-marker 1 zerop indent-rigidly] 10 2133678 "P"] nil) indent-for-tab-command(nil) call-interactively(indent-for-tab-command nil nil) command-execute(indent-for-tab-command) --=-=-= Content-Type: application/emacs-lisp Content-Disposition: attachment; filename=testfile.el Content-Transfer-Encoding: quoted-printable (require 'advice) (defadvice backward-sexp (after test activate) (when (called-interactively-p 'interactive) (message "interactive"))) (defadvice forward-sexp (after test activate) (when (called-interactively-p 'interactive) (message "interactive"))) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Jul 21 19:10:15 2015 Received: (at 21083-done) by debbugs.gnu.org; 21 Jul 2015 23:10:15 +0000 Received: from localhost ([127.0.0.1]:55775 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZHgfu-0008Gl-Vl for submit@debbugs.gnu.org; Tue, 21 Jul 2015 19:10:15 -0400 Received: from smtp-pri-02-1.vtxnet.net ([212.147.62.146]:58697 helo=smtp-pri-02.vtxnet.net) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZHgfs-0008GS-Et for 21083-done@debbugs.gnu.org; Tue, 21 Jul 2015 19:10:13 -0400 Received: from localhost (unknown [127.0.0.1]) by smtp-pri-02.vtxnet.net (VTX Services SA) with ESMTP id 569C637DD57; Wed, 22 Jul 2015 01:10:11 +0200 (CEST) Received: from smtp-pri-02.vtxnet.net ([212.147.62.146]) by localhost (smtp-pri-02.vtxnet.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oIgBpss2cmaC; Wed, 22 Jul 2015 01:10:08 +0200 (CEST) Received: from fmsmemgm.homelinux.net (dyn.83-228-180-068.dsl.vtx.ch [83.228.180.68]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-pri-02.vtxnet.net (VTX Services SA) with ESMTP id 3429E37DD56; Wed, 22 Jul 2015 01:10:08 +0200 (CEST) Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id 63BDDAF16E; Tue, 21 Jul 2015 19:10:07 -0400 (EDT) From: Stefan Monnier To: Dmitri Paduchikh Subject: Re: bug#21083: 24.5; Infinite loop in called-interactively-p Message-ID: References: <87fv4mrur4.fsf@gmail.com> Date: Tue, 21 Jul 2015 19:10:07 -0400 In-Reply-To: <87fv4mrur4.fsf@gmail.com> (Dmitri Paduchikh's message of "Sat, 18 Jul 2015 08:48:31 +0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.0 (+) X-Debbugs-Envelope-To: 21083-done Cc: 21083-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) > I have prepared a simple example to reproduce the problem. In the > attachment is a small elisp file testfile.el. Save it and execute: Thanks, that made it easy. I installed the patch below which should fix the inf-loop. Stefan diff --git a/lisp/emacs-lisp/nadvice.el b/lisp/emacs-lisp/nadvice.el index a6db5e9..5a59a98 100644 --- a/lisp/emacs-lisp/nadvice.el +++ b/lisp/emacs-lisp/nadvice.el @@ -522,8 +522,9 @@ of the piece of advice." (while (progn (funcall get-next-frame) - (not (and (eq (nth 1 frame2) 'apply) - (eq (nth 3 frame2) inneradvice))))) + (and frame2 + (not (and (eq (nth 1 frame2) 'apply) + (eq (nth 3 frame2) inneradvice)))))) (funcall get-next-frame) (funcall get-next-frame)))) (- i origi 1)))) From unknown Mon Jun 23 04:08:23 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 19 Aug 2015 11:24:03 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator