From debbugs-submit-bounces@debbugs.gnu.org Mon Oct 17 19:24:28 2022 Received: (at submit) by debbugs.gnu.org; 17 Oct 2022 23:24:28 +0000 Received: from localhost ([127.0.0.1]:50431 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okZT9-0000AW-4t for submit@debbugs.gnu.org; Mon, 17 Oct 2022 19:24:27 -0400 Received: from lists.gnu.org ([209.51.188.17]:54956) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okZT7-0000AN-C5 for submit@debbugs.gnu.org; Mon, 17 Oct 2022 19:24:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:45198) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1okZT6-0000WD-Ur for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2022 19:24:25 -0400 Received: from mail-ej1-x631.google.com ([2a00:1450:4864:20::631]:39520) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1okZT0-0005Hx-5f for bug-gnu-emacs@gnu.org; Mon, 17 Oct 2022 19:24:24 -0400 Received: by mail-ej1-x631.google.com with SMTP id b2so28430155eja.6 for ; Mon, 17 Oct 2022 16:24:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=mime-version:user-agent:message-id:date:subject:to:from:from:to:cc :subject:date:message-id:reply-to; bh=dFUm0MQWctEClWc9VZqOT3iTdWxnElHWLppamAzRNkA=; b=Jn14eB30smQHJGfe42107zQYRBU0c0jg17Ga5SBx9cRUeso/oJqUSuV3iiEi0O894d Qj/4ZJ7X/b4KC2NG1vI0HpNQJ3pWxU2xXBWatcd5CPGPL1t44MS2fAy4nW0yua7nb5p8 NOPvQ68fo8PPl+Vl3aYMvBZRJIoAac8SWNq5a0oj7nQdyek10KNlY4BS7Qtr8e6BssMZ Sj9/DjLQeI00Xy4fOKBXkegcqTLwM9dAwMlN7Q6reLwcjAJWfQmwASW9l4OYuJ7vwJsB bEuadre3Eaf/3W6kVIyERRgsAiDIgXWTF6MSjnjMSBmFTAdCGn56V7VQa9Lyz/I1qbXa +V5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=dFUm0MQWctEClWc9VZqOT3iTdWxnElHWLppamAzRNkA=; b=gdRrokGiV68RVQYw6lHsGwmwaNUyxJHuadCYAMgCPWj82Nr6fXNPw1SYpCSiPx6H0l riPvM4NQdBPdeLoE3A4rCzhLBimHReOYnaIN9xHQO6TCuG79OTXP41BUyRXUO9urhMam EEjZk0Rf9Zeqge6+mPuaYrCOm5/0sEOsvoNwUJo220zfT1pUFqggokX1b9V1xzFnJ9Mm wHwvlFSXOYR1HPRcICGx4MFyj807zZAwUSNofCSW8wH79IgYJ8vkUdMCuU9JiOtZCS2L C+ccHee3l1sGQki6gjfYP5IKBWn7HfPs+Dn3nbnxz60nJuvAiPi7y5rObUwFip2rVKFR Efmw== X-Gm-Message-State: ACrzQf03X5ambdgVqkHgeMLNrYWvcpoLICRcCGzS6qVItAdmA5XyO7Gb n5203AAAtwT3CIwuUnZkQ8HkEtG4BY1nQw== X-Google-Smtp-Source: AMsMyM59YnYY6LnIh3QI9kIfcg2GWOjnwgxUgyEZv2l4FtNxEBTJkUg+BgWKtv414iizKsVrBYu+qQ== X-Received: by 2002:a17:906:5dcc:b0:78d:fb98:6f85 with SMTP id p12-20020a1709065dcc00b0078dfb986f85mr89887ejv.123.1666049053821; Mon, 17 Oct 2022 16:24:13 -0700 (PDT) Received: from localhost ([2a02:587:321f:7e8a:d9:365a:ced1:b3d1]) by smtp.gmail.com with ESMTPSA id k13-20020a17090627cd00b0077826b92d99sm6747091ejc.12.2022.10.17.16.24.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Oct 2022 16:24:13 -0700 (PDT) From: "Basil L. Contovounesios" To: bug-gnu-emacs@gnu.org Subject: 29.0.50; Infinite loop in byte-compile--first-symbol-with-pos X-Debbugs-Cc: Alan Mackenzie , Mattias =?utf-8?Q?Engdeg=C3=A5r?= =?utf-8?Q?d?= , Stefan Monnier Date: Tue, 18 Oct 2022 02:24:02 +0300 Message-ID: <8735bm6nl9.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=2a00:1450:4864:20::631; envelope-from=contovob@tcd.ie; helo=mail-ej1-x631.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -2.4 (--) --=-=-= Content-Type: text/plain Given this sample input file: --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline; filename=my.el Content-Transfer-Encoding: quoted-printable ;;; my.el -*- lexical-binding: t -*- (require 'ert) (eval-and-compile (defun my-cycle () (declare (pure t)) (let ((list (list t))) (nconc list list))) (defun my-identity (arg) (declare (compiler-macro (lambda (_form) (macroexp-warn-and-return "Oh dear" arg)))) arg)) (ert-deftest my-test () (should (my-identity (my-cycle)))) ;;; my.el ends here --=-=-= Content-Type: text/plain Byte-compiling it as follows hangs indefinitely: emacs -Q -batch -f batch-byte-compile my.el While it's hanging, might as well poke it: pkill -f 'batch-byte-compile my\.el' -SIGUSR2 To which it yields the following backtrace: --=-=-= Content-Type: text/plain Content-Disposition: attachment; filename=backtrace.txt Content-Transfer-Encoding: quoted-printable Debugger entered--Lisp error: (quit) byte-compile--first-symbol-with-pos((t . #1)) byte-compile--first-symbol-with-pos('(t . #2)) byte-compile--first-symbol-with-pos((progn (macroexp--funcall-if-compiled= #f(compiled-function () #)) '(t . #5))) byte-compile--first-symbol-with-pos(((my-cycle) (macroexp--funcall-if-com= piled #f(compiled-function () #)) (progn (macro= exp--funcall-if-compiled #f(compiled-function () #)) '(t . #8)) (setcar value-0 (progn (macroexp--funcall-if-compiled #f(c= ompiled-function () #)) '(t . #12))) (unwind-pr= otect (setcar value-0 (progn (macroexp--funcall-if-compiled #f(compiled-fun= ction () #)) '(t . #15))) :fun-body (internal-m= ake-closure nil (form-description-1 value-0) nil (setcar (internal-get-clos= ed-var 0) (list '(should ...) :form '(progn ... ...) :value (car-safe (inte= rnal-get-closed-var 1)))) (ert--signal-should-execution (car-safe (internal= -get-closed-var 0))))) (let ((form-description-1 (list nil))) (unwind-prote= ct (setcar value-0 (progn (macroexp--funcall-if-compiled #f(compiled-functi= on () #)) '(t . #19))) :fun-body (internal-make= -closure nil (form-description-1 value-0) nil (setcar (internal-get-closed-= var 0) (list '... :form '... :value (car-safe ...))) (ert--signal-should-ex= ecution (car-safe (internal-get-closed-var 0)))))) (let ((value-0 (list (ge= nsym "ert-form-evaluation-aborted-")))) (let ((form-description-1 (list nil= ))) (unwind-protect (setcar value-0 (progn (macroexp--funcall-if-compiled #= f(compiled-function () #)) '...)) :fun-body (in= ternal-make-closure nil (form-description-1 value-0) nil (setcar (internal-= get-closed-var 0) (list ... :form ... :value ...)) (ert--signal-should-exec= ution (car-safe ...))))) (car-safe value-0)) #'(lambda nil (let ((value-0 (= list ...))) (let ((form-description-1 ...)) (if (unwind-protect ... :fun-bo= dy ...) nil (ert-fail ...))) (car-safe value-0))) (record 'ert-test 'my-tes= t nil #'(lambda nil (let ((value-0 ...)) (let (...) (if ... nil ...)) (car-= safe value-0))) nil :passed nil "/tmp/my.el") (ert-set-test 'my-test (recor= d 'ert-test 'my-test nil #'(lambda nil (let (...) (let ... ...) (car-safe v= alue-0))) nil :passed nil "/tmp/my.el")) (ert-deftest my-test nil (should (= my-identity (my-cycle)))))) byte-compile--warning-source-offset() byte-compile-log-warning("Oh dear" t :warning) byte-compile-warn("%s" "Oh dear") apply(byte-compile-warn "%s" "Oh dear") byte-compile-warn-x((my-cycle) "%s" "Oh dear") #f(compiled-function () #)() #f(compiled-function (form) #)((macroexp--fu= ncall-if-compiled #f(compiled-function () #))) byte-compile-form((macroexp--funcall-if-compiled #f(compiled-function () = #)) t) byte-compile-body(((macroexp--funcall-if-compiled #f(compiled-function ()= #)) '(t . #4)) nil) byte-compile-progn((progn (macroexp--funcall-if-compiled #f(compiled-func= tion () #)) '(t . #5))) byte-compile-form((progn (macroexp--funcall-if-compiled #f(compiled-funct= ion () #)) '(t . #5))) byte-compile-two-args((setcar value-0 (progn (macroexp--funcall-if-compil= ed #f(compiled-function () #)) '(t . #8)))) byte-compile-form((setcar value-0 (progn (macroexp--funcall-if-compiled #= f(compiled-function () #)) '(t . #8))) t) byte-compile-unwind-protect((unwind-protect (setcar value-0 (progn (macro= exp--funcall-if-compiled #f(compiled-function () #)) '(t . #10))) :fun-body (internal-make-closure nil (form-description-1= value-0) nil (setcar (internal-get-closed-var 0) (list '(should (my-identi= ty ...)) :form '(progn (macroexp--funcall-if-compiled ...) (my-cycle)) :val= ue (car-safe (internal-get-closed-var 1)))) (ert--signal-should-execution (= car-safe (internal-get-closed-var 0)))))) byte-compile-form((unwind-protect (setcar value-0 (progn (macroexp--funca= ll-if-compiled #f(compiled-function () #)) '(t = . #10))) :fun-body (internal-make-closure nil (form-description-1 value-0) = nil (setcar (internal-get-closed-var 0) (list '(should (my-identity ...)) := form '(progn (macroexp--funcall-if-compiled ...) (my-cycle)) :value (car-sa= fe (internal-get-closed-var 1)))) (ert--signal-should-execution (car-safe (= internal-get-closed-var 0))))) t) ... byte-compile-form((record 'ert-test 'my-test nil #'(lambda nil (let ((val= ue-0 (list ...))) (let ((form-description-1 ...)) (if (unwind-protect ... := fun-body ...) nil (ert-fail ...))) (car-safe value-0))) nil :passed nil "/t= mp/my.el")) mapc(byte-compile-form ('my-test (record 'ert-test 'my-test nil #'(lambda= nil (let ((value-0 ...)) (let (...) (if ... nil ...)) (car-safe value-0)))= nil :passed nil "/tmp/my.el"))) byte-compile-normal-call((ert-set-test 'my-test (record 'ert-test 'my-tes= t nil #'(lambda nil (let ((value-0 ...)) (let (...) (if ... nil ...)) (car-= safe value-0))) nil :passed nil "/tmp/my.el"))) byte-compile-form((ert-set-test 'my-test (record 'ert-test 'my-test nil #= '(lambda nil (let ((value-0 ...)) (let (...) (if ... nil ...)) (car-safe va= lue-0))) nil :passed nil "/tmp/my.el")) t) byte-compile-keep-pending((ert-set-test 'my-test (record 'ert-test 'my-te= st nil #'(lambda nil (let ((value-0 ...)) (let (...) (if ... nil ...)) (car= -safe value-0))) nil ':passed 'nil "/tmp/my.el"))) byte-compile-file-form((ert-set-test 'my-test (record 'ert-test 'my-test = nil #'(lambda nil (let ((value-0 ...)) (let (...) (if ... nil ...)) (car-sa= fe value-0))) nil ':passed 'nil "/tmp/my.el"))) #f(compiled-function (form) #)((ert-set-tes= t 'my-test (record 'ert-test 'my-test nil #'(lambda nil (let ((value-0 ...)= ) (let (form-description-1) (if ... nil ...)) value-0)) nil ':passed 'nil "= /tmp/my.el"))) byte-compile-recurse-toplevel((ert-set-test 'my-test (record 'ert-test 'm= y-test nil #'(lambda nil (let ((value-0 ...)) (let (form-description-1) (if= ... nil ...)) value-0)) nil ':passed 'nil "/tmp/my.el")) #f(compiled-funct= ion (form) #)) #f(compiled-function (subform) #)((ert-set-t= est 'my-test (record 'ert-test 'my-test nil #'(lambda nil (let ((value-0 ..= .)) (let (form-description-1) (if ... nil ...)) value-0)) nil ':passed 'nil= "/tmp/my.el"))) mapcar(#f(compiled-function (subform) #) ((e= rt-set-test 'my-test (record 'ert-test 'my-test nil #'(lambda nil (let (...= ) (let ... ...) value-0)) nil ':passed 'nil "/tmp/my.el")) 'my-test)) byte-compile-recurse-toplevel((ert-deftest my-test nil (should (my-identi= ty (my-cycle)))) #f(compiled-function (form) #)) byte-compile-toplevel-file-form((ert-deftest my-test nil (should (my-iden= tity (my-cycle))))) #f(compiled-function (inbuffer) #)(#) byte-compile-from-buffer(#) byte-compile-file("my.el") batch-byte-compile-file("my.el") batch-byte-compile() command-line-1(("-f" "batch-byte-compile" "my.el")) command-line() normal-top-level() --=-=-= Content-Type: text/plain I.e. the 'pure' compile-time form has a cycle, and the DFS of byte-compile--first-symbol-with-pos gets lost. Paraphrasing Stefan, it's acceptable if the compiler mishandles circular source code, but it should be able to handle circular data. I don't know why, but I can reproduce the hang only when the form is inside ert-deftest+should, and not inside a plain defun. Perhaps byte-compile--first-symbol-with-pos needs to employ something like byte-run--ssp-seen? Or does ERT somehow come into play? Thanks, -- Basil In GNU Emacs 29.0.50 (build 1, x86_64-pc-linux-gnu, X toolkit, cairo version 1.16.0, Xaw3d scroll bars) of 2022-10-18 built on tia Repository revision: c2b79d9148f21c3717f1eaa2d37b837b0922b94c Repository branch: master Windowing system distributor 'The X.Org Foundation', version 11.0.12101004 System Description: Debian GNU/Linux bookworm/sid Configured using: 'configure 'CFLAGS=-Og -ggdb3' -C --prefix=/home/blc/.local --enable-checking=structs --with-file-notification=yes --with-x-toolkit=lucid --with-x' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS WEBP X11 XAW3D XDBE XIM XINPUT2 XPM LUCID ZLIB Important settings: value of $LANG: en_IE.UTF-8 value of $XMODIFIERS: @im=ibus 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 cl-loaddefs cl-lib sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils 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 theme-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 x-toolkit xinput2 x multi-tty make-network-process emacs) Memory information: ((conses 16 36538 7652) (symbols 48 5112 0) (strings 32 13853 1864) (string-bytes 1 382346) (vectors 16 9260) (vector-slots 8 147212 11667) (floats 8 23 25) (intervals 56 242 0) (buffers 1000 10)) --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 18 10:51:30 2022 Received: (at 58601) by debbugs.gnu.org; 18 Oct 2022 14:51:30 +0000 Received: from localhost ([127.0.0.1]:53711 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oknwI-0006xV-IB for submit@debbugs.gnu.org; Tue, 18 Oct 2022 10:51:30 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:32006) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oknwF-0006xD-6m for 58601@debbugs.gnu.org; Tue, 18 Oct 2022 10:51:29 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 57FB680976; Tue, 18 Oct 2022 10:51:21 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id B0F2D805B2; Tue, 18 Oct 2022 10:51:19 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1666104679; bh=0dg8Q7Y6JogiryN6p8xoaGuA+xRog25E1jAdW+cDlVw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=X/q89corgnx/sEITE0NxOWx4vNi/aK2ryK/Tkw7FvFG7xeN2E4fSHqv7jomBP6SRI jh1FvFrobk41YNWiwWeZZLQh5g14OF7KZpVufyt4ZChqIwAWMl/0+9PJg5mCMXhQ/g Rye0vt/4XpRj3Hz9Z4vuFwQNF2kbgdfgrulK7yCTcfCd2SRwrg8F7C2Ziyvf7ktj7q xolbQ3I5VriaaL0RSD1s5BjnbWMsSEbp/BeSTYrYdauNMcEwl6iK86gwG9dLQXVdsM LzpSYyc1nypKuwrkjRJ0/oCF2ePIdcnVAvIKl7/pKeuqptx0dwsHERSCQxCs4uul5+ WLKdgKfoVDMTQ== Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 816B4120FA2; Tue, 18 Oct 2022 10:51:19 -0400 (EDT) From: Stefan Monnier To: "Basil L. Contovounesios" Subject: Re: bug#58601: 29.0.50; Infinite loop in byte-compile--first-symbol-with-pos In-Reply-To: <8735bm6nl9.fsf@tcd.ie> (Basil L. Contovounesios's message of "Tue, 18 Oct 2022 02:24:02 +0300") Message-ID: References: <8735bm6nl9.fsf@tcd.ie> Date: Tue, 18 Oct 2022 10:51:18 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.120 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58601 Cc: Alan Mackenzie , 58601@debbugs.gnu.org, Mattias =?windows-1252?Q?Engdeg=E5rd?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) > Perhaps byte-compile--first-symbol-with-pos needs to employ something > like byte-run--ssp-seen? Or does ERT somehow come into play? I just added in `master` an arbitrary limit to the loop inside `byte-compile--first-symbol-with-pos` to make sure it can't inf-loop. Can you confirm it fixes your original problem? Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 18 11:02:05 2022 Received: (at 58601) by debbugs.gnu.org; 18 Oct 2022 15:02:05 +0000 Received: from localhost ([127.0.0.1]:53750 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oko6W-0007HN-Vk for submit@debbugs.gnu.org; Tue, 18 Oct 2022 11:02:05 -0400 Received: from mx3.muc.de ([193.149.48.5]:26985) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oko6R-0007GM-Ia for 58601@debbugs.gnu.org; Tue, 18 Oct 2022 11:02:03 -0400 Received: (qmail 7364 invoked by uid 3782); 18 Oct 2022 17:01:51 +0200 Received: from acm.muc.de (p4fe15b73.dip0.t-ipconnect.de [79.225.91.115]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 18 Oct 2022 17:01:51 +0200 Received: (qmail 8269 invoked by uid 1000); 18 Oct 2022 15:01:49 -0000 Date: Tue, 18 Oct 2022 15:01:49 +0000 To: "Basil L. Contovounesios" Subject: Re: bug#58601: 29.0.50; Infinite loop in byte-compile--first-symbol-with-pos Message-ID: References: <8735bm6nl9.fsf@tcd.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8735bm6nl9.fsf@tcd.ie> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58601 Cc: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= , 58601@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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 (-) Hello, Basil. On Tue, Oct 18, 2022 at 02:24:02 +0300, Basil L. Contovounesios wrote: > Given this sample input file: [ .... ] > Byte-compiling it as follows hangs indefinitely: > emacs -Q -batch -f batch-byte-compile my.el > While it's hanging, might as well poke it: > pkill -f 'batch-byte-compile my\.el' -SIGUSR2 > To which it yields the following backtrace: [ .... ] > I.e. the 'pure' compile-time form has a cycle, and the DFS of > byte-compile--first-symbol-with-pos gets lost. What's a DFS? > Paraphrasing Stefan, it's acceptable if the compiler mishandles > circular source code, but it should be able to handle circular data. The problem here seems to be feeding macroexp-warn-and-return with data as the FORM argument. FORM is intended only to be an executable lisp form. The doc string, perhaps, could be clearer on this. > I don't know why, but I can reproduce the hang only when the form is inside > ert-deftest+should, and not inside a plain defun. There is a huge concentration of "advanced" features inside those ~20 lines of Lisp code. There's eval-and-compile, nconc, a compiler-macro, and ert. ;-) > Perhaps byte-compile--first-symbol-with-pos needs to employ something > like byte-run--ssp-seen? Or does ERT somehow come into play? It wouldn't be difficult, just tedious, to add checking for circular lists into byte-compile--first-symbol-with-pos. But a circular list is an invalid argument for FORM in macorexp-warn-and-return, see above. There are surely lots of places in Emacs where feeding a circular list as an argument to a function will cause a hang. At the moment, I'm not in favour of doing anything here. I don't think there's a bug. > Thanks, > -- > Basil -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 18 12:34:17 2022 Received: (at 58601) by debbugs.gnu.org; 18 Oct 2022 16:34:17 +0000 Received: from localhost ([127.0.0.1]:53981 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okpXl-0005sx-At for submit@debbugs.gnu.org; Tue, 18 Oct 2022 12:34:17 -0400 Received: from mail-ej1-f48.google.com ([209.85.218.48]:39878) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okpXj-0005sk-Ud for 58601@debbugs.gnu.org; Tue, 18 Oct 2022 12:34:16 -0400 Received: by mail-ej1-f48.google.com with SMTP id b2so33652228eja.6 for <58601@debbugs.gnu.org>; Tue, 18 Oct 2022 09:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=ivB/Oi54TPTynY8ZNZDst5WLgaloK3SaZ0QleG8Gy1k=; b=gn32YPRKDk6cgczx62K8iDcK5EeyRsCq6UZPmJqu+U+QoJgnJgjFGK3R+ANGrqEAAb 82oPeBFLT5EyEI6/MqDrJ4dBWPMeSnKVQprBdms10cNJEmJxmvwmZ94LmSeov1yUbNuj ha7/10vbF5/QP/cZWgzJB9PqJYzbzqnhylGjPBVw9DnCKaBFGQoKDN3tGh1IRWL8rk/Q 0PturL6zSxkCeITPtcHYk1n57AtfOTq0PG0/sAjYgwEop3rB2PAGnvg5LRsF3ma7CH5F 0KA35glzvuubVfwfcBtvlsqSrBiVmxaGtn1i1TUPY5AsLu2vAc1IUj9U2Xf3AlRhQK91 amaw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=ivB/Oi54TPTynY8ZNZDst5WLgaloK3SaZ0QleG8Gy1k=; b=2iMJId4rl4zt6y70iJvu91dFUACj4E4DzHrhGX1HNGsp/PP8Sd9YEtDeZ7XLxuI/kH 8fMsde1YZZ6cbLNNQzK36K+cgidjxvGdzLRnemjI0L9kX7gCm6NxXI1D6MvPgw3/Z5IZ hJfqpuRs8AfF1oOTUzO+w1h8Evn0U3miCHeNL2e6xpkbpBcHiFvP1OUZhwHgwBUBGihz +jsNcLsbbYPU0zH2Wjt1PEOfvhdXUzGDqph/f7MSEKdoPr0YSFICQilMdGeIm2ba+XH9 nQcdn0oScQZN8bl+EyTY4D7MFytuULEKsC8rb0jqLFWeeqTbJWxrPZ8CjLZG1dLCL21Z 69RQ== X-Gm-Message-State: ACrzQf2A9H9aoVvzvhV+0rCOSQI6bzrg7d19vSpOVJFDiPSxhnV6k8+F biOOic6N9u/7IQgi9sEHMuNyEA== X-Google-Smtp-Source: AMsMyM6Yg1XwVX5XwvpnQWI78d80ujOvsFBHhIMCwoFAkJ1tcqkDaC118/qgOcX0kAI5I7kq/nXldA== X-Received: by 2002:a17:907:2c6a:b0:78d:caaa:27a8 with SMTP id ib10-20020a1709072c6a00b0078dcaaa27a8mr3216056ejc.79.1666110850177; Tue, 18 Oct 2022 09:34:10 -0700 (PDT) Received: from localhost ([2a02:587:321f:7e8a:d9:365a:ced1:b3d1]) by smtp.gmail.com with ESMTPSA id jt3-20020a170906dfc300b0078db5bddd9csm7786587ejc.22.2022.10.18.09.34.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 09:34:09 -0700 (PDT) From: "Basil L. Contovounesios" To: Alan Mackenzie Subject: Re: bug#58601: 29.0.50; Infinite loop in byte-compile--first-symbol-with-pos In-Reply-To: (Alan Mackenzie's message of "Tue, 18 Oct 2022 15:01:49 +0000") References: <8735bm6nl9.fsf@tcd.ie> Date: Tue, 18 Oct 2022 19:34:08 +0300 Message-ID: <87pmepw0ov.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 58601 Cc: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , 58601@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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 (-) Alan Mackenzie [2022-10-18 15:01 +0000] wrote: > On Tue, Oct 18, 2022 at 02:24:02 +0300, Basil L. Contovounesios wrote: > >> I.e. the 'pure' compile-time form has a cycle, and the DFS of >> byte-compile--first-symbol-with-pos gets lost. > > What's a DFS? Depth-First Search. >> Paraphrasing Stefan, it's acceptable if the compiler mishandles >> circular source code, but it should be able to handle circular data. > > The problem here seems to be feeding macroexp-warn-and-return with data > as the FORM argument. That's not the problem, because it's just for illustrative purposes. Instead of 'arg' being passed unchanged as the FORM argument, it could just as well have been `(my-frobnicate ,arg). > FORM is intended only to be an executable lisp form. `(my-frobnicate ,arg) fits that bill, right? The end result is the same: macroexp-warn-and-return is fed a form containing a cycle, without any of the code that gives rise to the form being circular itself. >> I don't know why, but I can reproduce the hang only when the form is inside >> ert-deftest+should, and not inside a plain defun. > > There is a huge concentration of "advanced" features inside those ~20 > lines of Lisp code. Maybe when the compiler detects sufficiently advanced Lisp it should (signal 'indistinguishable-from-magic (list form)) > There's eval-and-compile, That's just a shortcut: one could equivalently put my-cycle and my-identity in a separate file and 'require' it. The compiler just needs to know that my-cycle is pure and my-identity has a compiler-macro before reaching their call sites. > nconc, a compiler-macro, and ert. ;-) You forgot 'pure'. We're spoilt for choice! >> Perhaps byte-compile--first-symbol-with-pos needs to employ something >> like byte-run--ssp-seen? Or does ERT somehow come into play? > > It wouldn't be difficult, just tedious, to add checking for circular > lists into byte-compile--first-symbol-with-pos. But a circular list is > an invalid argument for FORM in macorexp-warn-and-return, see above. How else should a compiler-macro safely warn about a problematic function argument? > There are surely lots of places in Emacs where feeding a circular list as > an argument to a function will cause a hang. Sure, but a subset of those places should reasonably be expected to not hang... > At the moment, I'm not in favour of doing anything here. I don't think > there's a bug. ...for instance, when dealing with compile-time constants in real-world Elisp. Thanks, -- Basil From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 18 12:34:21 2022 Received: (at 58601) by debbugs.gnu.org; 18 Oct 2022 16:34:21 +0000 Received: from localhost ([127.0.0.1]:53983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okpXo-0005tD-Oo for submit@debbugs.gnu.org; Tue, 18 Oct 2022 12:34:21 -0400 Received: from mail-wr1-f52.google.com ([209.85.221.52]:47092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okpXj-0005si-9n for 58601@debbugs.gnu.org; Tue, 18 Oct 2022 12:34:19 -0400 Received: by mail-wr1-f52.google.com with SMTP id bk15so24468609wrb.13 for <58601@debbugs.gnu.org>; Tue, 18 Oct 2022 09:34:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=LHlxvf2M3aehLsATnMEebhPqb//Ur+IVoH49ZDhRbRc=; b=cPM56Hsy0MOPAYJeYqfhN1XG9l05hbFegrfUqWl5S77MAb4ldsqJ1mjLBWo+njRdP1 c0PignRUbJSpEna4R251a+vbhQmhAQOZxggEcGt43nkfbIUZofgDo9uzvQ3obF+vOhEv jvgAhPHTbLuX6Vr8MDKG38e1Z+hxIVP69e+8uvqb+vPkNCeUTcigkjCm1X2UTO/ec7cX iQtcqM0b9fqTZCQMVRq6obHqJZhAjIXzSGbVrX1a9eqxJQhDmco6NJn8446ECW6cdrtY Fp4m6Ggn6iKplXPRYkqzDqzCRBsQDt0pRc2/YmqgHFeR2NjjgQxnX1v6Kaga5nysAOQg rVpQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=LHlxvf2M3aehLsATnMEebhPqb//Ur+IVoH49ZDhRbRc=; b=VyYf9zSmqIWQ4cVf0DDvmqupBLmpspF8NZHeoPhZCz/OpNJElswKNJhzR7/o946NAE DtgktG0/p+gkx9EiI2LbdHqzOFGpgMClf6ylTtuqTRG+EETpfM5EceCrJFut/gXNLL6z uur9IFSppjsE9sHrbsTcaV+T/CR+QFP3+PPjuRfEdBrf//Dahm8tCdoJXtvWpl+ZXzEf cX/55yqlEnJcNKjJK8TTxGOGhJG1ljHsk05chsRD7X5mcWHhx9RVPa2/0SbkaWFe7fHN aqHs+D3dMnyItBKHgCdKQPdLgrWA8cclSp+wHvutXUF2UC2SJYJuw3nmp4imTc/hExdW lIlg== X-Gm-Message-State: ACrzQf1jzxd6notiWuV84XdA0/1is/Zxqhpnu7ZPjy+fm4WfJqf/JSSs LFCZv15tYVrECuvi9WASYHLv2XC0G7Ba9w== X-Google-Smtp-Source: AMsMyM677ulhaKgUYLYLCzdI2pMojhoWItcLg0IyMaaczO/MTC1WjbZ/9JbxANmtqzRiog4iElIKoA== X-Received: by 2002:a17:907:a068:b0:78d:cbcf:f7bc with SMTP id ia8-20020a170907a06800b0078dcbcff7bcmr3173182ejc.519.1666110837608; Tue, 18 Oct 2022 09:33:57 -0700 (PDT) Received: from localhost ([2a02:587:321f:7e8a:d9:365a:ced1:b3d1]) by smtp.gmail.com with ESMTPSA id bs15-20020a170906d1cf00b0077958ddaec6sm7598822ejb.186.2022.10.18.09.33.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 09:33:57 -0700 (PDT) From: "Basil L. Contovounesios" To: Stefan Monnier Subject: Re: bug#58601: 29.0.50; Infinite loop in byte-compile--first-symbol-with-pos In-Reply-To: (Stefan Monnier's message of "Tue, 18 Oct 2022 10:51:18 -0400") References: <8735bm6nl9.fsf@tcd.ie> Date: Tue, 18 Oct 2022 19:33:55 +0300 Message-ID: <87r0z5w0p8.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 58601 Cc: Alan Mackenzie , 58601@debbugs.gnu.org, Mattias =?utf-8?Q?Engdeg=C3=A5rd?= X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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 (-) Stefan Monnier [2022-10-18 10:51 -0400] wrote: >> Perhaps byte-compile--first-symbol-with-pos needs to employ something >> like byte-run--ssp-seen? Or does ERT somehow come into play? > > I just added in `master` an arbitrary limit to the loop inside > `byte-compile--first-symbol-with-pos` to make sure it can't inf-loop. > > Can you confirm it fixes your original problem? Can confirm, thanks, -- Basil From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 18 13:07:14 2022 Received: (at 58601) by debbugs.gnu.org; 18 Oct 2022 17:07:14 +0000 Received: from localhost ([127.0.0.1]:54004 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okq3d-0006lt-PJ for submit@debbugs.gnu.org; Tue, 18 Oct 2022 13:07:14 -0400 Received: from mx3.muc.de ([193.149.48.5]:30841) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okq3Z-0006ld-BV for 58601@debbugs.gnu.org; Tue, 18 Oct 2022 13:07:12 -0400 Received: (qmail 50650 invoked by uid 3782); 18 Oct 2022 19:07:01 +0200 Received: from acm.muc.de (p4fe15b73.dip0.t-ipconnect.de [79.225.91.115]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Tue, 18 Oct 2022 19:07:01 +0200 Received: (qmail 9512 invoked by uid 1000); 18 Oct 2022 17:06:59 -0000 Date: Tue, 18 Oct 2022 17:06:59 +0000 To: "Basil L. Contovounesios" Subject: Re: bug#58601: 29.0.50; Infinite loop in byte-compile--first-symbol-with-pos Message-ID: References: <8735bm6nl9.fsf@tcd.ie> <87pmepw0ov.fsf@tcd.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87pmepw0ov.fsf@tcd.ie> X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58601 Cc: Mattias =?iso-8859-1?Q?Engdeg=E5rd?= , 58601@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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 (-) Hello, Basil. On Tue, Oct 18, 2022 at 19:34:08 +0300, Basil L. Contovounesios wrote: > Alan Mackenzie [2022-10-18 15:01 +0000] wrote: > > On Tue, Oct 18, 2022 at 02:24:02 +0300, Basil L. Contovounesios wrote: > >> I.e. the 'pure' compile-time form has a cycle, and the DFS of > >> byte-compile--first-symbol-with-pos gets lost. > > What's a DFS? > Depth-First Search. Thanks! > >> Paraphrasing Stefan, it's acceptable if the compiler mishandles > >> circular source code, but it should be able to handle circular data. > > The problem here seems to be feeding macroexp-warn-and-return with data > > as the FORM argument. > That's not the problem, because it's just for illustrative purposes. > Instead of 'arg' being passed unchanged as the FORM argument, it could > just as well have been `(my-frobnicate ,arg). That would not loop, since there is a symbol with position there. > > FORM is intended only to be an executable lisp form. > `(my-frobnicate ,arg) fits that bill, right? The end result is the > same: macroexp-warn-and-return is fed a form containing a cycle, without > any of the code that gives rise to the form being circular itself. This would not loop. > >> I don't know why, but I can reproduce the hang only when the form is inside > >> ert-deftest+should, and not inside a plain defun. > > There is a huge concentration of "advanced" features inside those ~20 > > lines of Lisp code. > Maybe when the compiler detects sufficiently advanced Lisp it should > (signal 'indistinguishable-from-magic (list form)) > > There's eval-and-compile, > That's just a shortcut: one could equivalently put my-cycle and > my-identity in a separate file and 'require' it. The compiler just > needs to know that my-cycle is pure and my-identity has a > compiler-macro before reaching their call sites. > > nconc, a compiler-macro, and ert. ;-) > You forgot 'pure'. We're spoilt for choice! :-) > >> Perhaps byte-compile--first-symbol-with-pos needs to employ something > >> like byte-run--ssp-seen? Or does ERT somehow come into play? > > It wouldn't be difficult, just tedious, to add checking for circular > > lists into byte-compile--first-symbol-with-pos. But a circular list is > > an invalid argument for FORM in macorexp-warn-and-return, see above. > How else should a compiler-macro safely warn about a problematic > function argument? by calling the normal byte compiler warning facilities. If there is a symbol somewhere in the FORM passed to them, it won't loop, even if it is a circular list. You called macroexp-warn-and-return from outside of the byte compiler. >From within the byte compiler, it cannot generate a loop (see above). > > There are surely lots of places in Emacs where feeding a circular > > list as an argument to a function will cause a hang. > Sure, but a subset of those places should reasonably be expected to not > hang... Your circular list containing an ordinary symbol (i.e. without position) is not going to arise in the byte compiler. > > At the moment, I'm not in favour of doing anything here. I don't think > > there's a bug. > ...for instance, when dealing with compile-time constants in real-world > Elisp. Maybe you could construct an example of a circular list without a symbol from code being compiled. Maybe you could cause a warning from a correct call of macroexp-warn-and-return to loop. But I'd be surprised. > Thanks, > -- > Basil -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 18 13:26:42 2022 Received: (at 58601) by debbugs.gnu.org; 18 Oct 2022 17:26:42 +0000 Received: from localhost ([127.0.0.1]:54029 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okqMT-0007GF-O3 for submit@debbugs.gnu.org; Tue, 18 Oct 2022 13:26:42 -0400 Received: from mail-qk1-f181.google.com ([209.85.222.181]:35745) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okpIC-00038E-L8 for 58601@debbugs.gnu.org; Tue, 18 Oct 2022 12:18:13 -0400 Received: by mail-qk1-f181.google.com with SMTP id t25so8971773qkm.2 for <58601@debbugs.gnu.org>; Tue, 18 Oct 2022 09:18:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=FuCeCPFWbRL7VI9dHhmSstZxybDjcbjvxsy7pG6BYsU=; b=iEWX1yumHL/XeUn7uWJbMJgG3DBmEw6sNKC0dk0tYWkCAIljfgc4xmTtANQnG6dfBh 8svF/GXRZ43iF24y2LxPxbre5qultkxu/kCzUrz77IbBlLq14vxEZQMKnOEExrw2M4FP wN9qApB2lJW6duVd5IHxrV+qBmD0RI7E4/02JQiVAzK80ddATKpYowrk5zhDEexb9YV+ 53nYD6eatX+MoZryAawY11LDvMUV6erEfFL6bD0zQkO11VIogsJvVhjtLBu7LlWpGSPw 2JVE2DUNn0GD5KivSbQ2FLeRCoThTBlmTwhhhNgeQxxGiI0yoYl+6fVkkAlkkUOS00YZ hw1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=FuCeCPFWbRL7VI9dHhmSstZxybDjcbjvxsy7pG6BYsU=; b=HMe378nU0AX4BkYR2bzuX769bT6QF2ZQvKuT/bLOjaF5kui2M9PandkmmlR5tU31Fk XFtHGYOOOfwyf7sA6RUS6WUhrfZvpKKmGMM3rXpI2Myw10sou0tEeLJJeftxbO7Rg38U Fe9Uj9tJZ9sJ9BvmviF7FS3QbLBiY3r3+WyeH+xdR4j33LxIZZv4VkW1rknbHdfMYEu5 Oaft+OC+lIbq/O9TRUS+PFZbJsriyI3hBehpE7+PkcUmm5DPNyYrRGn62sEK9eRkDmnw xBjwgpKqZN0PunNoiUQiIHRYuU4VKf6NbG70jRUAmgPvKg1E1v2XgX1VolRih1Fx12lC SKQA== X-Gm-Message-State: ACrzQf3oNINZbmcBVJXv5kY9yzIpvqViZOqZmP8yP7IjVVrnScqBp3cL p2hOeWGH6zuifHEqTLpNyNEd3VTCHD8= X-Google-Smtp-Source: AMsMyM5P8mgZ7fOdqO9Y1k7beZnFT4rWhvB/tVh6KDH0lD3gxUqSHRtic2Z6G6nNHix/USJ1wgHplQ== X-Received: by 2002:a05:620a:240a:b0:6ed:fbf1:2e02 with SMTP id d10-20020a05620a240a00b006edfbf12e02mr2400386qkn.271.1666109886978; Tue, 18 Oct 2022 09:18:06 -0700 (PDT) Received: from localhost (pool-173-56-234-28.nycmny.fios.verizon.net. [173.56.234.28]) by smtp.gmail.com with ESMTPSA id bx14-20020a05622a090e00b0035ce8965045sm2159891qtb.42.2022.10.18.09.18.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 09:18:06 -0700 (PDT) From: dick To: Alan Mackenzie Subject: Re: bug#58601: 29.0.50; Infinite loop in byte-compile--first-symbol-with-pos In-Reply-To: (Alan Mackenzie's message of "Tue, 18 Oct 2022 15:01:49 +0000") References: <8735bm6nl9.fsf@tcd.ie> Date: Tue, 18 Oct 2022 12:18:06 -0400 Message-ID: <875ygh3y2p.fsf@dick> User-Agent: Gnus/5.14 (Gnus v5.14) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58601 X-Mailman-Approved-At: Tue, 18 Oct 2022 13:26:40 -0400 Cc: 58601@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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 (-) AM> But a circular list is an invalid argument This betrays a basic misunderstanding of what compilers do. Would that it were so convenient that compiler writers could admit non-terminating compilation based on the content of user programs. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 18 14:05:03 2022 Received: (at 58601) by debbugs.gnu.org; 18 Oct 2022 18:05:03 +0000 Received: from localhost ([127.0.0.1]:54072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okqxP-0008HQ-HV for submit@debbugs.gnu.org; Tue, 18 Oct 2022 14:05:03 -0400 Received: from mail-qt1-f169.google.com ([209.85.160.169]:42992) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1okqYa-0007a0-Rz for 58601@debbugs.gnu.org; Tue, 18 Oct 2022 13:39:13 -0400 Received: by mail-qt1-f169.google.com with SMTP id w3so10121859qtv.9 for <58601@debbugs.gnu.org>; Tue, 18 Oct 2022 10:39:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=IB/O2MXHr2UNdBZBvQean2wo5pNQCw29Eu2S3dT4+ag=; b=W8AkPHwUpx4Y2UcyNVkYYGcz42kdKTHVYCUjE5LSNb2oDsvN/XR8/9VclKwE4G2bGv iHsiKvuL27F3gHRDUi/wnPcos8vwtlFWg0rEDajbTBXlcOIVG4ja/I98QBngoTGPSRpF z6CWxp2Yrko0NZnin3fO6uF/8YOmvOww53K/RLg0Bk2ytY4A99bUtERRhdwrIiABoc0Y bl96YaqNiie8jWHQHwEoYXMRx1JG8VzbNxLNwLCNRpKEUp2v4dqtOr8ZSoc10qn79+5J EdGEXtS19Kd9O0rNV/aWjHcjubv0OmKRAJaM4eQ66sqBpzwAqTamPWg03jyK7U+YU1kv yAdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=IB/O2MXHr2UNdBZBvQean2wo5pNQCw29Eu2S3dT4+ag=; b=7QS/vZhBJXylpsS1Ekr4s1H50xIYM/jZLYgpmc8KlKN4mG+EMoEFMEH5IBYZ3WK8dU gLDcHLakP7rXmSmVke1u9brmM+jMs1K5zJJeANwSGvu2RAawoCjxth2ehifvBVa77Vmt J0LkDxVbiAuc9NincW/toDp8je0G7/Zcaz/2cD+L/3ngnQ3ai3p9aKEt21BLUCHkhpnt VKCUOd/v4/Bm304KwNJ2BoFhDCwanUfYTRu7QwLwl5Qj+pgDyjqWf7O5mVuuR1AAEF/6 YkMSkVjXjbYlzRNOSSFfDnU1gDt5MCAZh9ntnQctmHj5NxnF95l9fkIT25nuIQ1NdCVG YVkg== X-Gm-Message-State: ACrzQf1mDYgHHanuyEd/P4odSK8SESLjTCt76D7cym8zmrDHHW1Vv6SD yZepYQN13zvk2m/4yTEIPIhNeWV/21E= X-Google-Smtp-Source: AMsMyM5dkNLeO9oZaN0+Ej4K+ZYRNfsj8xIusFU2idnFh6szYJFV5TDCVm73YsfnRdZfNOOp7tKtGQ== X-Received: by 2002:a05:622a:178c:b0:39a:90ba:fc53 with SMTP id s12-20020a05622a178c00b0039a90bafc53mr3071538qtk.673.1666114747294; Tue, 18 Oct 2022 10:39:07 -0700 (PDT) Received: from localhost (pool-173-56-234-28.nycmny.fios.verizon.net. [173.56.234.28]) by smtp.gmail.com with ESMTPSA id i15-20020a05620a404f00b006ee91ab3538sm3096012qko.36.2022.10.18.10.39.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 18 Oct 2022 10:39:06 -0700 (PDT) From: dick To: Alan Mackenzie Subject: Re: bug#58601: 29.0.50; Infinite loop in byte-compile--first-symbol-with-pos In-Reply-To: (Alan Mackenzie's message of "Tue, 18 Oct 2022 17:06:59 +0000") References: <8735bm6nl9.fsf@tcd.ie> <87pmepw0ov.fsf@tcd.ie> Date: Tue, 18 Oct 2022 13:39:06 -0400 Message-ID: <87v8oh2fr9.fsf@dick> User-Agent: Gnus/5.14 (Gnus v5.14) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58601 X-Mailman-Approved-At: Tue, 18 Oct 2022 14:04:51 -0400 Cc: 58601@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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 (-) AM> a correct call of macroexp-warn-and-return Your notions of correctness appear to coincide with those which do not require you to make changes. Mine do as well. Your defense is a novel one, however. Someone approaches you asserting "Some cars don't stop with your brake calipers," and you refute by showing him cars which do. From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 18 15:19:57 2022 Received: (at 58601) by debbugs.gnu.org; 18 Oct 2022 19:19:57 +0000 Received: from localhost ([127.0.0.1]:54149 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oks7z-0001r4-9d for submit@debbugs.gnu.org; Tue, 18 Oct 2022 15:19:57 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:49434) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oks7t-0001qn-Sy for 58601@debbugs.gnu.org; Tue, 18 Oct 2022 15:19:49 -0400 Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 51FC44428BA; Tue, 18 Oct 2022 15:19:38 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 82A3E4428B9; Tue, 18 Oct 2022 15:19:36 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1666120776; bh=v5lB3tjl7UEhT/PgDBmcmfcZy0VzOOaXnQ0WUpK61Dw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=FW6JNojfpBy4F0z3GM8XwWFlpjSMwyZSyCxqIOQYkWGQHbkjUYGy6mLIU4P1B9RcQ kHCIoNzMBNiox2K6zE7/NqLD87oztlwv6Rqn/IheMjdJnqxbpNB8LwckSt1NfMrj8q 7Q4Kb4iVv1zGBhdR1cRhMOKeWfStJ/vO9Np3zI367p45LTUzGsFuf3fG95RmmIFtbJ bdcWEv0Nw4eu4h4OGAvKDK/XSxU2Jw5gq8g4TcbUPYZKePP99D3u8lFu+aOhKUq6X+ VHqKet7OvcWc9jwsRqjvsDZTzzWXGfD2n06Z4xV46dMGSc+1Kzv6ATyy4RFM8Z6BI/ ok5xG84RUr8Fw== Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 6F39E12098D; Tue, 18 Oct 2022 15:19:36 -0400 (EDT) From: Stefan Monnier To: Alan Mackenzie Subject: Re: bug#58601: 29.0.50; Infinite loop in byte-compile--first-symbol-with-pos In-Reply-To: (Alan Mackenzie's message of "Tue, 18 Oct 2022 17:06:59 +0000") Message-ID: References: <8735bm6nl9.fsf@tcd.ie> <87pmepw0ov.fsf@tcd.ie> Date: Tue, 18 Oct 2022 15:19:35 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.038 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58601 Cc: "Basil L. Contovounesios" , Mattias =?windows-1252?Q?Engdeg=E5rd?= , 58601@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) >> That's not the problem, because it's just for illustrative purposes. >> Instead of 'arg' being passed unchanged as the FORM argument, it could >> just as well have been `(my-frobnicate ,arg). > > That would not loop, since there is a symbol with position there. BTE, the real-world use case is a compiler macro which takes the list of args and tucks the name of another function in front. So the generated code, passed to `macroexp-warn-and-return` has the shape (somefun somearg1 somearg2) where `somefun` does *not* come from the source but from the compiler-macro instead and hence doesn't have any sympos, and then `somearg1` was an expression of the form (quote #1=(1 2 3 . #1#)) So, there was no cycle in the code part, the cycle is only inside the data embedded in the code. Stefan From debbugs-submit-bounces@debbugs.gnu.org Tue Oct 18 15:20:03 2022 Received: (at 58601-done) by debbugs.gnu.org; 18 Oct 2022 19:20:03 +0000 Received: from localhost ([127.0.0.1]:54153 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oks8A-0001re-OH for submit@debbugs.gnu.org; Tue, 18 Oct 2022 15:20:03 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:45853) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oks88-0001r9-90 for 58601-done@debbugs.gnu.org; Tue, 18 Oct 2022 15:20:00 -0400 Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id EADC310013B; Tue, 18 Oct 2022 15:19:54 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 84ADA1000E7; Tue, 18 Oct 2022 15:19:53 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1666120793; bh=jPw/gnJo/rhdeRB6CB0v5tIvul9b0vbOJAO84G9Npok=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=eZ3+woT60HffVv03g5Xhcokt6TGS9EYL3FpK19dUU/YFQVIjG/8ES0Nx4NIwhJFd2 gI9o0rBuY0ucSS021TdKgOxe6YfCIOXGKc+qVSjn5ku4g5i/aTTGiN5zChuVWzR8hK 1wUzgn/ysBsoRV50cyDhRBB1kvExBJz5DSqSKT9JgYg/K81HELkhiIA2cU/TkG+Osw xu7pqR4dDe95ktTB8XVG9OHX/n7jMuZkCbcAlSbD4oXG0iA0toauC14duZfEBw+m2Q xcW/vZPPl13vqa1Bfr7kZqOMXZ2RAmtzF0m0JIMENOFJGiPpdkAb2RH5+77BDPK8bT N0a+yuAregTuQ== Received: from lechazo (lechon.iro.umontreal.ca [132.204.27.242]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 706031207BF; Tue, 18 Oct 2022 15:19:53 -0400 (EDT) From: Stefan Monnier To: "Basil L. Contovounesios" Subject: Re: bug#58601: 29.0.50; Infinite loop in byte-compile--first-symbol-with-pos In-Reply-To: <87r0z5w0p8.fsf@tcd.ie> (Basil L. Contovounesios's message of "Tue, 18 Oct 2022 19:33:55 +0300") Message-ID: References: <8735bm6nl9.fsf@tcd.ie> <87r0z5w0p8.fsf@tcd.ie> Date: Tue, 18 Oct 2022 15:19:52 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL 0.163 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58601-done Cc: Mattias =?windows-1252?Q?Engdeg=E5rd?= , Alan Mackenzie , 58601-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) Basil L. Contovounesios [2022-10-18 19:33:55] wrote: > Stefan Monnier [2022-10-18 10:51 -0400] wrote: >>> Perhaps byte-compile--first-symbol-with-pos needs to employ something >>> like byte-run--ssp-seen? Or does ERT somehow come into play? >> >> I just added in `master` an arbitrary limit to the loop inside >> `byte-compile--first-symbol-with-pos` to make sure it can't inf-loop. >> >> Can you confirm it fixes your original problem? > > Can confirm, thanks, Thanks, closing, Stefan From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 19 04:52:20 2022 Received: (at 58601) by debbugs.gnu.org; 19 Oct 2022 08:52:20 +0000 Received: from localhost ([127.0.0.1]:55770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ol4oG-0001FG-Cw for submit@debbugs.gnu.org; Wed, 19 Oct 2022 04:52:20 -0400 Received: from mx3.muc.de ([193.149.48.5]:38681) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ol4oE-0001F2-Jj for 58601@debbugs.gnu.org; Wed, 19 Oct 2022 04:52:19 -0400 Received: (qmail 65513 invoked by uid 3782); 19 Oct 2022 10:52:11 +0200 Received: from acm.muc.de (p4fe15a32.dip0.t-ipconnect.de [79.225.90.50]) (using STARTTLS) by colin.muc.de (tmda-ofmipd) with ESMTP; Wed, 19 Oct 2022 10:52:10 +0200 Received: (qmail 3434 invoked by uid 1000); 19 Oct 2022 08:52:10 -0000 Date: Wed, 19 Oct 2022 08:52:10 +0000 To: Stefan Monnier Subject: Re: bug#58601: 29.0.50; Infinite loop in byte-compile--first-symbol-with-pos Message-ID: References: <8735bm6nl9.fsf@tcd.ie> <87pmepw0ov.fsf@tcd.ie> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Submission-Agent: TMDA/1.3.x (Ph3nix) From: Alan Mackenzie X-Primary-Address: acm@muc.de X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 58601 Cc: "Basil L. Contovounesios" , Mattias =?iso-8859-1?Q?Engdeg=E5rd?= , 58601@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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 (-) On Tue, Oct 18, 2022 at 15:19:35 -0400, Stefan Monnier wrote: > >> That's not the problem, because it's just for illustrative purposes. > >> Instead of 'arg' being passed unchanged as the FORM argument, it could > >> just as well have been `(my-frobnicate ,arg). > > That would not loop, since there is a symbol with position there. > BTE, the real-world use case is a compiler macro which takes the list of > args and tucks the name of another function in front. So the generated > code, passed to `macroexp-warn-and-return` has the shape > (somefun somearg1 somearg2) > where `somefun` does *not* come from the source but from the > compiler-macro instead and hence doesn't have any sympos, and then > `somearg1` was an expression of the form > (quote #1=(1 2 3 . #1#)) > So, there was no cycle in the code part, the cycle is only inside the > data embedded in the code. I think somebody who writes something like that _deserves_ to go into an infinite loop. Have you ever seen anything at all like this in real life? You have fixed this "problem" by arbitrarily limiting the size of valid form stacks that can be searched, and the depth to which they can be searched. This limit, 10, seems too small. There can easily be form stacks with more than 10 elements. Do you have any objection if I change that 10 to something closer to infinity? Something which will encompass any form stack likely to be encountered in practice? I would suggest the number 300. > Stefan -- Alan Mackenzie (Nuremberg, Germany). From debbugs-submit-bounces@debbugs.gnu.org Wed Oct 19 08:48:40 2022 Received: (at 58601) by debbugs.gnu.org; 19 Oct 2022 12:48:40 +0000 Received: from localhost ([127.0.0.1]:56152 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ol8Ux-000869-RZ for submit@debbugs.gnu.org; Wed, 19 Oct 2022 08:48:40 -0400 Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:9221) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ol8Uw-00085w-9W for 58601@debbugs.gnu.org; Wed, 19 Oct 2022 08:48:38 -0400 Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 0C67180CCE; Wed, 19 Oct 2022 08:48:32 -0400 (EDT) Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id 626EE805B2; Wed, 19 Oct 2022 08:48:30 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1666183710; bh=rx3zX5ngX7bLVdF/e9Mv6cB46DxMVb0LwTS3fiy5DI0=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=WRVi/faH1rZ/W6h3z7Z07A8xjJhx2POYXAQMsn8DdrfAZHt9pA48O3ofFY31kmnk1 7F4YfRqH6N6dmEeuKe69320Z3VeyCTVY+RtLaTE90OhZqBnZlMWB7o0+ZKaSKW4jJc BQISyg7liSX0sUqa01NxhqrXRTsrgJFqaYJPhTLP97PlGIW+QNJNaAd0G4htn+r69f P11V3WL1Tw5oNzRvF1cqOkMkt9+R2D5OulsA6xXzeF+bdsgjafWZf7cbChMIl5pgPS Y8vgbL6MMtdaYamiZ5+yC89/tjVbFPm5fJ9AUGxpuH+DRdTT6djvS9lwfTvIha+jX3 7a1i9QvYetkjA== Received: from pastel (65-110-220-202.cpe.pppoe.ca [65.110.220.202]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 03C2F12046D; Wed, 19 Oct 2022 08:48:29 -0400 (EDT) From: Stefan Monnier To: Alan Mackenzie Subject: Re: bug#58601: 29.0.50; Infinite loop in byte-compile--first-symbol-with-pos In-Reply-To: (Alan Mackenzie's message of "Wed, 19 Oct 2022 08:52:10 +0000") Message-ID: References: <8735bm6nl9.fsf@tcd.ie> <87pmepw0ov.fsf@tcd.ie> Date: Wed, 19 Oct 2022 08:48:27 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SPAM-INFO: Spam detection results: 0 ALL_TRUSTED -1 Passed through trusted hosts only via SMTP AWL -0.115 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain X-SPAM-LEVEL: X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 58601 Cc: "Basil L. Contovounesios" , Mattias =?windows-1252?Q?Engdeg=E5rd?= , 58601@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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: -3.3 (---) >> where `somefun` does *not* come from the source but from the >> compiler-macro instead and hence doesn't have any sympos, and then >> `somearg1` was an expression of the form > >> (quote #1=(1 2 3 . #1#)) > >> So, there was no cycle in the code part, the cycle is only inside the >> data embedded in the code. > > I think somebody who writes something like that _deserves_ to go into an > infinite loop. Circular data is not very frequent, but it's not rare either (as you found out during the development of sympos, as evidenced by `byte-run--ssp-seen`). `byte-compile--first-symbol-with-pos` didn't bump into it until now simply because it usually gets "lucky" and finds a sympos before getting to a cyclic embedded data. > Have you ever seen anything at all like this in real life? Of course, and so have you :-) > You have fixed this "problem" by arbitrarily limiting the size of > valid form stacks that can be searched, and the depth to which they > can be searched. This limit, 10, seems too small. There can easily > be form stacks with more than 10 elements. Do you have any objection > if I change that 10 to something closer to infinity? Be my guest. > Something which will encompass any form stack likely to be > encountered in practice? I would suggest the number 300. Fine by me. Tho once we get into this range, 666 sounds a lot more enticing. :-) Stefan From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 21 06:47:31 2022 Received: (at 58601) by debbugs.gnu.org; 21 Oct 2022 10:47:32 +0000 Received: from localhost ([127.0.0.1]:37129 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olpYp-0005Ho-Cn for submit@debbugs.gnu.org; Fri, 21 Oct 2022 06:47:31 -0400 Received: from mail-ed1-f49.google.com ([209.85.208.49]:38664) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olpYn-0005Hc-Ju for 58601@debbugs.gnu.org; Fri, 21 Oct 2022 06:47:30 -0400 Received: by mail-ed1-f49.google.com with SMTP id l22so4254628edj.5 for <58601@debbugs.gnu.org>; Fri, 21 Oct 2022 03:47:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=Vsj0iglL5z76pnAnLhzzoquDTj3zZxidXq3PIIQdDbs=; b=bSC55eBNUciaT5au5aUKxVJ/vSEdikPDqD2Ao7ngH7KBrmJGeyfsJfBj1gtDfWWqG9 /Z2CbabhnrwuMSABL1URXuKmnfJeqb261Zv2bWbNM9+cF3J1sYQOgMUxExI/xbKUWJpP RDL/i87+5Uy8GI5NKYwvmx4hr/SVmYdySwjoigaDBPzzG0f70gSK9If/O1m7svPbDGEy g6zgfL2ZzUWDqUvX+pCUTvx1N2ve2+sX7UA6pXhrD5RXcKzB66hL4YvTr6t22GRW7dxj QymAX2D9XJL3jNUAdJ0BQ+RjlFUCgDzpZmT2aFWQxCffJhVE0D22IXR9jhT/ZpMSoO5Z ozBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=Vsj0iglL5z76pnAnLhzzoquDTj3zZxidXq3PIIQdDbs=; b=T5pAEn53u61icUw/KjtMG7wmOzOuhwq7X82am6tooR0+xBOI0vJnYfHIOkq42tWJ79 6ceXAimNjBMu1N/gTMKqHYbjSmvcc5Vw2GknTenllOMq26BhUxZ1lx9prPAZYSBswmHu xVv1u0ykgyb7PRCzdIq1z6Nu5Qu9A5wRM+HowjUmJ2/3b5L/JMKmb5JeWxzHmMVFcS+y qP8VlYro7SmozsbZNRbbvyc863sIxQ/KiinBW1Tu6XHB7+PLx2EHwCgPdmVzoB/tlrUH Z5rcmUmeZeYStweymoqjcpwo7K1nV+eFbK9ePTGqigM1fkV1s7DEjFi/Qf26dsCn/8Dt BZLg== X-Gm-Message-State: ACrzQf0rzVYgl6Vlo9XH1CfHWXHJyHL4WMPbHebBo0p3bohdBelEc9vr c0M27/GRk5EtWa0evz990xHMGA== X-Google-Smtp-Source: AMsMyM4GhGIxMjXZuM9QoA/75C8+4w0yOsItHqJEnRFyXzYAlkcnJxqBDb+K2GLkNpQZFQVpQNt1yg== X-Received: by 2002:a17:907:31ca:b0:780:2170:e08c with SMTP id xf10-20020a17090731ca00b007802170e08cmr14685613ejb.145.1666349243500; Fri, 21 Oct 2022 03:47:23 -0700 (PDT) Received: from localhost ([2a02:587:321f:7e8a:d9:365a:ced1:b3d1]) by smtp.gmail.com with ESMTPSA id f20-20020a17090631d400b0073de0506745sm11400252ejf.197.2022.10.21.03.47.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 03:47:22 -0700 (PDT) From: "Basil L. Contovounesios" To: Alan Mackenzie Subject: Re: bug#58601: 29.0.50; Infinite loop in byte-compile--first-symbol-with-pos In-Reply-To: (Alan Mackenzie's message of "Tue, 18 Oct 2022 17:06:59 +0000") References: <8735bm6nl9.fsf@tcd.ie> <87pmepw0ov.fsf@tcd.ie> Date: Fri, 21 Oct 2022 13:47:21 +0300 Message-ID: <8735bhtpvq.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 58601 Cc: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , 58601@debbugs.gnu.org, Stefan Monnier X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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 (-) --=-=-= Content-Type: text/plain Alan Mackenzie [2022-10-18 17:06 +0000] wrote: > On Tue, Oct 18, 2022 at 19:34:08 +0300, Basil L. Contovounesios wrote: >> Alan Mackenzie [2022-10-18 15:01 +0000] wrote: >> > The problem here seems to be feeding macroexp-warn-and-return with data >> > as the FORM argument. >> That's not the problem, because it's just for illustrative purposes. >> Instead of 'arg' being passed unchanged as the FORM argument, it could >> just as well have been `(my-frobnicate ,arg). > > That would not loop, since there is a symbol with position there. > >> > FORM is intended only to be an executable lisp form. >> `(my-frobnicate ,arg) fits that bill, right? The end result is the >> same: macroexp-warn-and-return is fed a form containing a cycle, without >> any of the code that gives rise to the form being circular itself. > > This would not loop. And yet: --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline; filename=my.el Content-Transfer-Encoding: quoted-printable ;;; my.el -*- lexical-binding: t -*- (defun my-cycle () (declare (pure t)) (let ((list (list t))) (nconc list list))) (defun my-identity (arg) (declare (compiler-macro (lambda (_form) (macroexp-warn-and-return "Oh dear" `(identity ,arg))))) arg) (provide 'my) ;;; my.el ends here --=-=-= Content-Type: application/emacs-lisp Content-Disposition: inline; filename=my-tests.el Content-Transfer-Encoding: quoted-printable ;;; my-tests.el -*- lexical-binding: t -*- (require 'ert) (require 'my) (ert-deftest my-test () (should (my-identity (my-cycle)))) ;;; my-tests.el ends here --=-=-= Content-Type: text/plain Followed by: emacs -Q -L . -batch -f batch-byte-compile my.el emacs -Q -L . -batch -f batch-byte-compile my-tests.el The latter hangs prior to Stefan's limit on recursion. >> >> Perhaps byte-compile--first-symbol-with-pos needs to employ something >> >> like byte-run--ssp-seen? Or does ERT somehow come into play? >> > It wouldn't be difficult, just tedious, to add checking for circular >> > lists into byte-compile--first-symbol-with-pos. But a circular list is >> > an invalid argument for FORM in macorexp-warn-and-return, see above. >> How else should a compiler-macro safely warn about a problematic >> function argument? > > by calling the normal byte compiler warning facilities. Could you please point me to them? > If there is a symbol somewhere in the FORM passed to them, it won't > loop, even if it is a circular list. See the case of my-identity above. > You called macroexp-warn-and-return from outside of the byte compiler. > From within the byte compiler, it cannot generate a loop (see above). What counts as outside of the byte compiler? Do you mean that macroexp-warn-and-return should be disallowed in declare forms or macro definitions? Or that a compiler-macro should not pass forms derived from the function's arguments to macroexp-warn-and-return? AFAIA there is no precedent for such a restriction, and in fact I see the opposite trend in recent history: https://git.sv.gnu.org/cgit/emacs.git/commit/?id=d52c929e31 https://git.sv.gnu.org/cgit/emacs.git/commit/?id=52d5771e0a https://git.sv.gnu.org/cgit/emacs.git/commit/?id=5ee4209f30 https://git.sv.gnu.org/cgit/emacs.git/commit/?id=96926fa6eb https://git.sv.gnu.org/cgit/emacs.git/commit/?id=fffa53ff1a https://git.sv.gnu.org/cgit/emacs.git/commit/?id=bd40ec5d57 https://git.sv.gnu.org/cgit/emacs.git/commit/?id=13d6e8fa54 https://git.sv.gnu.org/cgit/emacs.git/commit/?id=155ddde4dd > Maybe you could construct an example of a circular list without a symbol > from code being compiled. Maybe you could cause a warning from a correct > call of macroexp-warn-and-return to loop. But I'd be surprised. You have repeatedly asserted that macroexp-warn-and-return will not loop if used correctly, but it is not clear to me from your description what correct use of macroexp-warn-and-return entails. Could you please explain? Thanks, -- Basil --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 21 06:48:08 2022 Received: (at 58601) by debbugs.gnu.org; 21 Oct 2022 10:48:08 +0000 Received: from localhost ([127.0.0.1]:37134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olpZQ-0005Kk-0L for submit@debbugs.gnu.org; Fri, 21 Oct 2022 06:48:08 -0400 Received: from mail-ed1-f48.google.com ([209.85.208.48]:47015) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olpZO-0005Jd-6w for 58601@debbugs.gnu.org; Fri, 21 Oct 2022 06:48:07 -0400 Received: by mail-ed1-f48.google.com with SMTP id m15so4200161edb.13 for <58601@debbugs.gnu.org>; Fri, 21 Oct 2022 03:48:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tcd.ie; s=google21; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=1UvYFE5xMRCPfGNnk2ZpiZhuNNjXplOOwwiO81rxzao=; b=WCEcAuH4ildFkcLjFAThczT1nZV54kZ9vqbwhhV6/FqRydP+q89BlXSpz5TPbCaQtH jmg1uEP8ENfpSZXIZ2W08oNvWgQSSG7kCrE6qoj9Jrd+9GinBTb8UVth5Xk7DRfAAjnk yS5UMAxcz5d3jHBPI6DmRrqEILmsMu4pEBbJphaWZtThEmdrYTwc1As74+/wxs/rE0UX qO2wu6DBx5Sjx8lUt4ZQCeigHdElCUzTGsMssgi5n5cx4HzZgHZa0p8UTZgvlPQu72CI P2EJvhHBMrOv8yF1vHKci3QKl6szodJ7LXvmIlkzOUNTUKd5B/GeJNAKa2QkbxYDwHEk CHXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:date:references:in-reply-to :subject:cc:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=1UvYFE5xMRCPfGNnk2ZpiZhuNNjXplOOwwiO81rxzao=; b=7UI886r+Nv8c/14sZMUzYOfSQmjs4Z8FGbybTUFVK+piqRXCUdfXc9s2emkPCTg8Jp CGPAIRj8Zd/D+BAYF463L/po5kljnETf/SlV2YU9O/2jWOagE14Oinodln5VqUQBBRJN kbcRQshW6nE/0CV/78bzrYUtpzAoyhhUz80nYeIrfOFt+LaqUSawBq9NGTdnQwAIv11R F2J5oODLGWbZpAXCESbFK50VhKx0MAqCsZXF9cOiPGruGzdB5BdhHPMBBr6j3hOm7eSk TbhJN07W39VkyrJmNtj0uJazjMWZHGVdPi8VlAYOhboQJ+6bWChGEsPR9NIpxuHfyh2j fMug== X-Gm-Message-State: ACrzQf2KhNenGTROmGelax+x8rxH3QsvtlU+99N1Z03xpkq8KMDhYmT2 dT4PQPhM1kqhcyYTTfVuVNIMMw== X-Google-Smtp-Source: AMsMyM6hvK+CGEgRR5HIaN5jRUHOqav0k/msywzClrquCL+RjSs1PLHr5GDJmfibHsKpeiFH6kwiXg== X-Received: by 2002:a17:907:9707:b0:78d:45d1:487e with SMTP id jg7-20020a170907970700b0078d45d1487emr14734623ejc.566.1666349280468; Fri, 21 Oct 2022 03:48:00 -0700 (PDT) Received: from localhost ([2a02:587:321f:7e8a:d9:365a:ced1:b3d1]) by smtp.gmail.com with ESMTPSA id l5-20020aa7c3c5000000b00458e73fe1c1sm13536826edr.8.2022.10.21.03.47.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Oct 2022 03:47:59 -0700 (PDT) From: "Basil L. Contovounesios" To: Alan Mackenzie Subject: Re: bug#58601: 29.0.50; Infinite loop in byte-compile--first-symbol-with-pos In-Reply-To: (Alan Mackenzie's message of "Wed, 19 Oct 2022 08:52:10 +0000") References: <8735bm6nl9.fsf@tcd.ie> <87pmepw0ov.fsf@tcd.ie> Date: Fri, 21 Oct 2022 13:47:53 +0300 Message-ID: <871qr1tpuu.fsf@tcd.ie> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 58601 Cc: Mattias =?utf-8?Q?Engdeg=C3=A5rd?= , Stefan Monnier , 58601@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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 (-) Alan Mackenzie [2022-10-19 08:52 +0000] wrote: > On Tue, Oct 18, 2022 at 15:19:35 -0400, Stefan Monnier wrote: >> >> That's not the problem, because it's just for illustrative purposes. >> >> Instead of 'arg' being passed unchanged as the FORM argument, it could >> >> just as well have been `(my-frobnicate ,arg). > >> > That would not loop, since there is a symbol with position there. > >> BTE, the real-world use case is a compiler macro which takes the list of >> args and tucks the name of another function in front. So the generated >> code, passed to `macroexp-warn-and-return` has the shape > >> (somefun somearg1 somearg2) > >> where `somefun` does *not* come from the source but from the >> compiler-macro instead and hence doesn't have any sympos, and then >> `somearg1` was an expression of the form > >> (quote #1=(1 2 3 . #1#)) > >> So, there was no cycle in the code part, the cycle is only inside the >> data embedded in the code. > > I think somebody who writes something like that _deserves_ to go into an > infinite loop. Have you ever seen anything at all like this in real > life? See some of the recent commits listed in my other message. -- Basil From debbugs-submit-bounces@debbugs.gnu.org Fri Oct 21 06:57:21 2022 Received: (at 58601) by debbugs.gnu.org; 21 Oct 2022 10:57:21 +0000 Received: from localhost ([127.0.0.1]:37139 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olpiF-0005Y7-8N for submit@debbugs.gnu.org; Fri, 21 Oct 2022 06:57:20 -0400 Received: from mail152c50.megamailservers.eu ([91.136.10.162]:52006 helo=mail50c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1olpiB-0005Xv-RA for 58601@debbugs.gnu.org; Fri, 21 Oct 2022 06:57:13 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1666349829; bh=Q+xv/suyxkBpuZ+UwZaQo0ea8Cdvw5hC44k9/MsojSk=; h=Subject:From:In-Reply-To:Date:Cc:References:To:From; b=LcVy87V47L4zDr7VjrYcXJKKYy53I/RT+H2PP4fnDypu1chcAfnf2yH11GipwEeLb jXegnL+D7VIkunOoVAKeigz+gLZtIZbvQyUT0P8CksBFPpKHzT/3qjh3dRH4gpXuFD y3e6A72gPjTIX//uHkv+36zAkMBGx4Bh6jk7nXFA= Feedback-ID: mattiase@acm.or Received: from smtpclient.apple (c188-150-171-209.bredband.tele2.se [188.150.171.209]) (authenticated bits=0) by mail50c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 29LAv5aH104202; Fri, 21 Oct 2022 10:57:07 +0000 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Subject: Re: bug#58601: 29.0.50; Infinite loop in byte-compile--first-symbol-with-pos From: =?utf-8?Q?Mattias_Engdeg=C3=A5rd?= In-Reply-To: Date: Fri, 21 Oct 2022 12:57:05 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <7D470BB7-0E5E-49D5-95F5-862B7E214A3A@acm.org> References: <8735bm6nl9.fsf@tcd.ie> <87pmepw0ov.fsf@tcd.ie> To: Stefan Monnier X-Mailer: Apple Mail (2.3654.120.0.1.13) X-CTCH-RefID: str=0001.0A782F24.63527B05.002D, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-Origin-Country: SE X-Spam-Score: 1.4 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: 19 okt. 2022 kl. 14.48 skrev Stefan Monnier : > Fine by me. Tho once we get into this range, 666 sounds a lot > more enticing. Since this code is only run when reporting errors, quadratic behaviour is perhaps not a disaster and we can replace the depth fuel with a list of values seen and thus detect loops in arbitrary data st [...] Content analysis details: (1.4 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.0 SPF_SOFTFAIL SPF: sender does not match SPF record (softfail) 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.4 KHOP_HELO_FCRDNS Relay HELO differs from its IP's reverse DNS X-Debbugs-Envelope-To: 58601 Cc: "Basil L. Contovounesios" , Alan Mackenzie , 58601@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 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 (-) 19 okt. 2022 kl. 14.48 skrev Stefan Monnier : > Fine by me. Tho once we get into this range, 666 sounds a lot > more enticing. Since this code is only run when reporting errors, quadratic behaviour = is perhaps not a disaster and we can replace the depth fuel with a list = of values seen and thus detect loops in arbitrary data structures. (Or = just run with 666.) From unknown Sat Sep 13 04:54:44 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 18 Nov 2022 12:24:04 +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