From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Juanma Barranquero Newsgroups: gmane.emacs.bugs Subject: bug#36216: 27.0.50; Variable binding depth exceeds max-specpld-size during bootstrap Date: Sun, 16 Jun 2019 07:57:20 +0200 Message-ID: References: <83o92zwed9.fsf@gnu.org> <83blyzw3zs.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="199739"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 36216@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jun 16 07:59:09 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hcOC5-000poJ-PJ for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Jun 2019 07:59:09 +0200 Original-Received: from localhost ([::1]:37706 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcOC4-0008GV-2b for geb-bug-gnu-emacs@m.gmane.org; Sun, 16 Jun 2019 01:59:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:35476) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hcOBz-0008GP-Lx for bug-gnu-emacs@gnu.org; Sun, 16 Jun 2019 01:59:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hcOBy-0002ER-Lv for bug-gnu-emacs@gnu.org; Sun, 16 Jun 2019 01:59:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54248) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hcOBy-0002EJ-IZ for bug-gnu-emacs@gnu.org; Sun, 16 Jun 2019 01:59:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hcOBy-0003VY-GW for bug-gnu-emacs@gnu.org; Sun, 16 Jun 2019 01:59:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Juanma Barranquero Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 16 Jun 2019 05:59:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36216 X-GNU-PR-Package: emacs Original-Received: via spool by 36216-submit@debbugs.gnu.org id=B36216.156066468413412 (code B ref 36216); Sun, 16 Jun 2019 05:59:02 +0000 Original-Received: (at 36216) by debbugs.gnu.org; 16 Jun 2019 05:58:04 +0000 Original-Received: from localhost ([127.0.0.1]:39559 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hcOB2-0003UG-0o for submit@debbugs.gnu.org; Sun, 16 Jun 2019 01:58:04 -0400 Original-Received: from mail-qk1-f195.google.com ([209.85.222.195]:37328) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hcOB0-0003Tm-P0 for 36216@debbugs.gnu.org; Sun, 16 Jun 2019 01:58:03 -0400 Original-Received: by mail-qk1-f195.google.com with SMTP id d15so4329945qkl.4 for <36216@debbugs.gnu.org>; Sat, 15 Jun 2019 22:58:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=E60LYgoQFk7q9ccZ0S8g/ijz2h2LuafmJf0swcCePug=; b=fV1eiMXySApKm9C2NRUAmBGXnKQpVfFMCvLuaZF65pMKdGQd3MiUVjdLjS1I5gTHyr PbBsB8pgKUC8WheNYSEZ021fwAf3bqWdkogPr/ls+vH80p5qFbDD7GUcbzDyaqRxGK0i b2e3AN0J8Tg3lhXRBBtxe/MNoaDxCVydywwG6K5QwPr0FheecekIdJ6I44pn2vgYWgIk 6nlCyLIzM4UI9cfBSdsgUhxr/5gsw2wt2NUlQH5LswBCnYzduDQgbqmqlJQMPmbfvstD 8DZNkmpf7D68A2gMTWZFD3ApNAepLcVFp1wu4Q5jnSaaTZ6MFwL7fhlv9Kvl+vy1kjOF QdJQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=E60LYgoQFk7q9ccZ0S8g/ijz2h2LuafmJf0swcCePug=; b=UeXPl1DHnHxf4I/y5k1Z3wAwjkIRJvwbqGzPR/S7MEEAxwHP9EfGudWwxfzLJ8s60d 9HYzGDQMkRmwhuVPf4hX9FMtwB5UGJqSiEaA2Y/PhDon4pb2P8tp83Bkri+iQixwYEQ1 14sclglpyHJsEJMNGD6gmR7epZ5M4csTom6LuJpnjJK7Sygbdkc8LYYrS67WXaRYcOqO GELuIMfPofKko/oIR5hsamGm92q4jIW3T9rZ6/GuYzu1pIwuZtogwxysVNYPBIPfgILg LxbJg8qNTYNUQAJMwlu9CrDXfbvo2S/k8eAwW/HdF3B1Dwvll/ARNoua0Xhka+QAgtm/ fctw== X-Gm-Message-State: APjAAAWivG9/bt9z1eZPAQcSqJ7r8Bd7DqxZ75cra1Qg2Oj3VMTInnzX jidiS2KG3gatFjqJ3nVeYDmJoKt/C8RuL5864U9H2WI/IlY= X-Google-Smtp-Source: APXvYqwLeHVq/1mFXmwoYi6xpI7Cfbck/LooP+kg6ebOGYJv2imIQ79ztnd0HQzRLDrMX8kmeQasFBtv7xkyjJdpTBg= X-Received: by 2002:ae9:f207:: with SMTP id m7mr26072244qkg.166.1560664676770; Sat, 15 Jun 2019 22:57:56 -0700 (PDT) In-Reply-To: <83blyzw3zs.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:160649 Archived-At: > Well, does the same command fails in the same way when invoked from > the command line? Once I remove the .elc files, any invocation of ./temacs --batch (with or without explicitly loading loadup.el or passing the --temacs arg) produces the same error, because it automatically loads loadup.el. > If so, just invoke it with the appropriate --eval > argument that increases the value of max-specpdl-size. AFAICS, setting max-specpdl-size in an --eval doesn't work, because temacs loads loadup.el before processing the --eval. If I instrument loadup.el to show its value, I get: $ ./temacs --eval "(setq max-specpdl-size 1450)" --batch Loading loadup.el (source)... > (loadup.el) max-specpdl-size = 1300 dump mode: nil Obviously, the problem disappears if I bind max-specpdl-size to a bigger value around the load of cl-generic, or if I set it explicitly in the conditional code at the beginning of loadup.el that also sets max-lisp-eval-depth (if (or (member dump-mode '("bootstrap" "pbootstrap")) ;; FIXME this is irritatingly fragile. (and (stringp (nth 4 command-line-args)) (string-match "^unidata-gen\\(\\.elc?\\)?$" (nth 4 command-line-args))) (member (nth 7 command-line-args) '("unidata-gen-file" "unidata-gen-charprop")) (null dump-mode)) (progn [...etc etc...] (setq max-specpdl-size 1450) ;;; <=== THIS WORKS ;; During bootstrapping the byte-compiler is run interpreted ;; when compiling itself, which uses a lot more stack ;; than usual. (setq max-lisp-eval-depth 2200))) I wonder if it wouldn't just make sense to borrow the same trick loadup.el uses with pcase.el to disable eager macroexpansion, i.e., something like diff --git i/lisp/loadup.el w/lisp/loadup.el index 67e8aa7d40..9f08b19043 100644 --- i/lisp/loadup.el +++ w/lisp/loadup.el @@ -246,7 +246,10 @@ (load "language/cham") (load "indent") -(load "emacs-lisp/cl-generic") +(if (byte-code-function-p (symbol-function 'macroexpand-all)) + (load "emacs-lisp/cl-generic") + (let ((macroexp--pending-eager-loads '(skip))) + (load "emacs-lisp/cl-generic"))) (load "frame") (load "startup") (load "term/tty-colors")