From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Teika Kazura Newsgroups: gmane.emacs.bugs Subject: bug#62317: 28.2; This byte-compiled file behaves wrongly. Date: Tue, 21 Mar 2023 12:54:08 +0900 (JST) Message-ID: <20230321.125408.609857763486645873.teika@gmx.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="5896"; mail-complaints-to="usenet@ciao.gmane.io" To: 62317@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Tue Mar 21 04:58:26 2023 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 1peT8k-0001L1-4w for geb-bug-gnu-emacs@m.gmane-mx.org; Tue, 21 Mar 2023 04:58:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1peT8W-0003xT-KF; Mon, 20 Mar 2023 23:58:12 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peT8U-0003xG-Q3 for bug-gnu-emacs@gnu.org; Mon, 20 Mar 2023 23:58:10 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1peT8N-0003WA-7t for bug-gnu-emacs@gnu.org; Mon, 20 Mar 2023 23:58:10 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1peT8M-0001zc-MM for bug-gnu-emacs@gnu.org; Mon, 20 Mar 2023 23:58:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Teika Kazura Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 21 Mar 2023 03:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62317 X-GNU-PR-Package: emacs X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.16793710537621 (code B ref -1); Tue, 21 Mar 2023 03:58:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 21 Mar 2023 03:57:33 +0000 Original-Received: from localhost ([127.0.0.1]:57324 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peT7t-0001yp-8a for submit@debbugs.gnu.org; Mon, 20 Mar 2023 23:57:33 -0400 Original-Received: from lists.gnu.org ([209.51.188.17]:43502) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1peT7r-0001yh-9T for submit@debbugs.gnu.org; Mon, 20 Mar 2023 23:57:31 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peT7q-0003vY-Ns for bug-gnu-emacs@gnu.org; Mon, 20 Mar 2023 23:57:30 -0400 Original-Received: from mout.gmx.net ([212.227.15.18]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1peT7o-0003Ra-Is for bug-gnu-emacs@gnu.org; Mon, 20 Mar 2023 23:57:30 -0400 Original-Received: from localhost ([153.206.10.174]) by mail.gmx.net (mrgmx005 [212.227.17.184]) with ESMTPSA (Nemesis) id 1M8ykW-1pbjq10uoQ-0066DE; Tue, 21 Mar 2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f9nnOpFY7sjTwEdl3ClQWc051Fbtp84FA8TLv2 Received-SPF: pass client-ip=212.227.15.18; envelope-from=teika@gmx.com; helo=mout.gmx.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:258329 Archived-At: Hi. In the situation below, a byte-compiled init code's evaluation is not completed, but emacs starts as if nothing was wrong. * How to reproduce: First, ~/.emacs.d/init.el: ------------------------------------------------------------------------ (eval-and-compile (push user-emacs-directory load-path) (require 'a)) ;; Hereafter is ignored when byte-compiled. (defvar foo-var 'baz) (message "Hello, world.") (pop-to-buffer "*Messages*") ------------------------------------------------------------------------ ~/.emacs.d/a.el: ------------------------------------------------------------------------ (set-buffer "*Messages*") ;; or (set-buffer (get-buffer-create "bar")) (provide 'a) ------------------------------------------------------------------------ Byte compile these two files *in this order*: $ cd ~/.emacs.d; emacs -Q -batch -f batch-byte-compile a.el init.el (you can now remove a.elc; it doesn't matter this bug.) Finally, run emacs as either of these: $ emacs -Q -l init.elc $ emacs --no-splash --no-site-file * Symptom As I commented in init.el, the code after `require' is ignored when init.el is byte-compiled. However, emacs starts as if nothing was wrong. The line of `set-buffer' in a.el seems to trigger this bug. If you delete that line, this bug doesn't occur. * version and build info: In short, emacs 28 regression, but I don't know the exact version - My 28.1 was without gcc-jit, and this bug was not there. The 28.2 is built with gcc-jit, and the bug hits me. Full build info: ------------------------------------------------------------------------ Gentoo Linux GNU Emacs 28.2 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.34, cairo version 1.16.0) of 2023-02-02 Configured using: 'configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --datarootdir=/usr/share --disable-silent-rules --docdir=/usr/share/doc/emacs-28.2-r4 --htmldir=/usr/share/doc/emacs-28.2-r4/html --libdir=/usr/lib64 --program-suffix=-emacs-28 --includedir=/usr/include/emacs-28 --infodir=/usr/share/info/emacs-28 --localstatedir=/var --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp --without-compress-install --without-hesiod --without-pop --with-file-notification=inotify --with-pdumper --enable-acl --without-dbus --with-modules --without-gameuser --with-libgmp --without-gpm --with-native-compilation --with-json --without-kerberos --without-kerberos5 --without-lcms2 --with-xml2 --without-mailutils --without-selinux --with-gnutls --without-libsystemd --with-threads --with-wide-int --with-sound=no --with-zlib --with-x --without-ns --without-gconf --with-gsettings --without-toolkit-scroll-bars --without-gif --without-jpeg --without-png --without-rsvg --without-tiff --without-xpm --without-imagemagick --with-xft --with-cairo --with-harfbuzz --with-libotf --with-m17n-flt --with-x-toolkit=gtk3 --without-xwidgets --with-dumping=pdumper 'CFLAGS=-march=native -O2 -pipe' 'LDFLAGS=-Wl,-O1 -Wl,--as-needed'' Configured features: ACL CAIRO FREETYPE GLIB GMP GNUTLS GSETTINGS HARFBUZZ JSON LIBOTF LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER SECCOMP THREADS X11 XDBE XIM GTK3 ZLIB ------------------------------------------------------------------------ Thanks, Emacs developers. Best regards, Teika