From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#55972: 28.1; Package quickstart generated for large number of packages generates byte-code string larger than 64K, triggering bytecode overflow error Date: Tue, 14 Jun 2022 18:29:32 +0200 Message-ID: <1058D1B4-9A9F-41D9-BE59-55BFA2A69A10@acm.org> References: Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.13\)) Content-Type: multipart/mixed; boundary="Apple-Mail=_91500EF0-CB8F-424C-90A6-1AA83833F829" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="8011"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 55972@debbugs.gnu.org, Stefan Monnier To: Lynn Winebarger Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Jun 14 18:44:03 2022 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1o19e6-0001qx-JZ for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 Jun 2022 18:44:02 +0200 Original-Received: from localhost ([::1]:53174 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1o19e4-0007Uu-Jb for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 14 Jun 2022 12:44:01 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:48304) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1o19Qa-0004DO-4s for bug-gnu-emacs@gnu.org; Tue, 14 Jun 2022 12:30:06 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41693) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1o19QZ-0008EC-RN for bug-gnu-emacs@gnu.org; Tue, 14 Jun 2022 12:30:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1o19QY-0001WG-Ks for bug-gnu-emacs@gnu.org; Tue, 14 Jun 2022 12:30:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 14 Jun 2022 16:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55972 X-GNU-PR-Package: emacs Original-Received: via spool by 55972-submit@debbugs.gnu.org id=B55972.16552241855791 (code B ref 55972); Tue, 14 Jun 2022 16:30:02 +0000 Original-Received: (at 55972) by debbugs.gnu.org; 14 Jun 2022 16:29:45 +0000 Original-Received: from localhost ([127.0.0.1]:35590 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o19QH-0001VL-9j for submit@debbugs.gnu.org; Tue, 14 Jun 2022 12:29:45 -0400 Original-Received: from mail1467c50.megamailservers.eu ([91.136.14.67]:53144 helo=mail268c50.megamailservers.eu) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1o19QE-0001V0-2v for 55972@debbugs.gnu.org; Tue, 14 Jun 2022 12:29:44 -0400 X-Authenticated-User: mattiase@bredband.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megamailservers.eu; s=maildub; t=1655224175; bh=/BYb11O/ndtPl/pQ1LNPokL7OuZ7kXuFyKkNxMjyqMA=; h=From:Subject:Date:Cc:To:From; b=lHyUcrqQBEpKUWQylqBF0B8izfIhxaRyJIeP54OgWVQMb4ERgm4TBCM/Nrt4zs9UU sIy0+y/T/gVo05fdfqJvrHqDXdBAT9dqxwaRdFuagQEebPAsuN3q84LFCLbpqIYZG1 AN3wKBtqywfqCF4aR5cDbHatCGcTaBPKTtUvR4lY= Feedback-ID: mattiase@acm.or Original-Received: from smtpclient.apple (c188-150-171-71.bredband.tele2.se [188.150.171.71]) (authenticated bits=0) by mail268c50.megamailservers.eu (8.14.9/8.13.1) with ESMTP id 25EGTWnC000780; Tue, 14 Jun 2022 16:29:34 +0000 X-Mailer: Apple Mail (2.3654.120.0.1.13) X-CTCH-RefID: str=0001.0A782F25.62A8B76F.0026, 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-Flags: 0 X-CTCH-ScoreCust: 0.000 X-Origin-Country: SE X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:234515 Archived-At: --Apple-Mail=_91500EF0-CB8F-424C-90A6-1AA83833F829 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii If, as seems to be the case, byte-compile-keep-pending is only used for = top-level forms, then this patch may even be correct. Does it solve your = problems? It still seems to generate far bigger bytecode chunks than the 300 = cutoff would imply but that's perhaps just a matter of calling the = function in more places. --Apple-Mail=_91500EF0-CB8F-424C-90A6-1AA83833F829 Content-Disposition: attachment; filename=bytecomp-flush-big.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="bytecomp-flush-big.diff" Content-Transfer-Encoding: 7bit diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index ab21fba8a2..156a38ec2d 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -2521,13 +2521,12 @@ byte-compile-output-docform (defun byte-compile-keep-pending (form &optional handler) (if (memq byte-optimize '(t source)) (setq form (byte-optimize-one-form form t))) + ;; To avoid consing up monstrously large forms at load time, we split + ;; the output regularly. + (when (nthcdr 300 byte-compile-output) + (byte-compile-flush-pending)) (if handler (let ((byte-compile--for-effect t)) - ;; To avoid consing up monstrously large forms at load time, we split - ;; the output regularly. - (and (memq (car-safe form) '(fset defalias)) - (nthcdr 300 byte-compile-output) - (byte-compile-flush-pending)) (funcall handler form) (if byte-compile--for-effect (byte-compile-discard))) --Apple-Mail=_91500EF0-CB8F-424C-90A6-1AA83833F829--