From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eric Marsden Newsgroups: gmane.emacs.bugs Subject: bug#65017: 29.1; Byte compiler interaction with cl-lib function objects, removes symbol-function Date: Wed, 2 Aug 2023 12:28:24 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22688"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:104.0) Gecko/20100101 Thunderbird/104.0 To: 65017@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Aug 02 15:34:13 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 1qRBzQ-0005by-Sc for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 02 Aug 2023 15:34:13 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qRBzJ-00067z-8G; Wed, 02 Aug 2023 09:34:05 -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 1qRBzG-00067Y-S5 for bug-gnu-emacs@gnu.org; Wed, 02 Aug 2023 09:34:02 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qRBzG-0008T5-K0 for bug-gnu-emacs@gnu.org; Wed, 02 Aug 2023 09:34:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qRBzG-0005rC-Ev for bug-gnu-emacs@gnu.org; Wed, 02 Aug 2023 09:34:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eric Marsden Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 02 Aug 2023 13:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 65017 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.169098319322416 (code B ref -1); Wed, 02 Aug 2023 13:34:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 2 Aug 2023 13:33:13 +0000 Original-Received: from localhost ([127.0.0.1]:49244 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qRByS-0005pS-7s for submit@debbugs.gnu.org; Wed, 02 Aug 2023 09:33:13 -0400 Original-Received: from lists.gnu.org ([2001:470:142::17]:44304) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qR9KP-0006sw-4r for submit@debbugs.gnu.org; Wed, 02 Aug 2023 06:43:42 -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 1qR9KJ-00079u-Rx for bug-gnu-emacs@gnu.org; Wed, 02 Aug 2023 06:43:35 -0400 Original-Received: from mail.risk-engineering.org ([2a01:4f8:c0c:a3f8::1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qR9KG-0007XQ-TT for bug-gnu-emacs@gnu.org; Wed, 02 Aug 2023 06:43:35 -0400 DKIM-Signature: a=rsa-sha256; bh=suFlt0GSIJ2HA+ZjZsWhPNmp2l/v1dgFRI6dky9fZQw=; c=relaxed/relaxed; d=risk-engineering.org; h=Subject:Subject:Sender:To:To:Cc:From:From:Date:Date:MIME-Version:MIME-Version:Content-Type:Content-Type:Content-Transfer-Encoding:Content-Transfer-Encoding:Reply-To:In-Reply-To:Message-Id:Message-Id:References:Autocrypt:Openpgp; i=@risk-engineering.org; s=default; t=1690972105; v=1; x=1691404105; b=Fq3lMIabN8M77QRHQDvT2ATSSmYRb3Awuh8SvlG1iQ2hlH7cPbbhbUVUvDuil17ukQyUELrH gdPezQhUJ8DCdJdJeiXCWYg4DuXyG+tMcfuGDqJFIDPErxVsz3ubRvzEjP+XqLg+/DcBm5ZyZqT ni1gTd4nYwZpnJ7ug6NcCdljUOPwtTCv3zVX4bfN502DPS/qllaSPn4bL9ff6deXSoqRV3GOsde Ec10qzzn+mWgGnyKQQiTFr6UX1QauD6Hxez4G0DjWxfvnrFaJyZyi7b7GZ9FUkDaG8VUZtuI88R O6yBAqK5duk55hc1Eyb8EBtDpX0B37D59kG82Zgg6+x4Q== Original-Received: by mail.risk-engineering.org (envelope-sender ) with ESMTPS id eb28a99d; Wed, 02 Aug 2023 12:28:25 +0200 Content-Language: en-US Received-SPF: pass client-ip=2a01:4f8:c0c:a3f8::1; envelope-from=eric.marsden@risk-engineering.org; helo=mail.risk-engineering.org X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 02 Aug 2023 09:33:11 -0400 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:266508 Archived-At: The byte-compiler seems to erroneously remove the symbol-function for equal in the code show below. --- file "perturb.el" --- (require 'cl-lib) (defun foo ()   (cl-flet ((bar (v) (list v)))     (make-hash-table :test #'equal))) --- --- file "use.el" --- (require 'cl-lib) (require 'ert) (defun test ()   (cl-flet ((foo (x) (list x)))     (should (equal nil 42)))) --- % emacs -Q --batch --eval '(byte-compile-file "perturb.el")' -l use.el -f test Error: invalid-function (#)   mapbacktrace(#f(compiled-function (evald func args flags) #))   debug-early-backtrace()   debug-early(error (invalid-function #))   #(nil 42)   apply(# (nil 42))   (setq value-2 (apply fn-0 args-1))   (unwind-protect (setq value-2 (apply fn-0 args-1)) (setq form-description-4 (nconc (list '(should (equal nil 42))) (list :form (cons fn-0 args-1)) (if (eql value-2 'ert-form-evaluation-aborted-3) nil (list :value value-2)) (if (eql value-2 'ert-form-evaluation-aborted-3) nil (let* ((-explainer- (and t (ert--get-explainer 'equal)))) (if -explainer- (list :explanation (apply -explainer- args-1)) nil))))) (ert--signal-should-execution form-description-4))   (if (unwind-protect (setq value-2 (apply fn-0 args-1)) (setq form-description-4 (nconc (list '(should (equal nil 42))) (list :form (cons fn-0 args-1)) (if (eql value-2 'ert-form-evaluation-aborted-3) nil (list :value value-2)) (if (eql value-2 'ert-form-evaluation-aborted-3) nil (let* ((-explainer- (and t (ert--get-explainer 'equal)))) (if -explainer- (list :explanation (apply -explainer- args-1)) nil))))) (ert--signal-should-execution form-description-4)) nil (ert-fail form-description-4))   (let (form-description-4) (if (unwind-protect (setq value-2 (apply fn-0 args-1)) (setq form-description-4 (nconc (list '(should (equal nil 42))) (list :form (cons fn-0 args-1)) (if (eql value-2 'ert-form-evaluation-aborted-3) nil (list :value value-2)) (if (eql value-2 'ert-form-evaluation-aborted-3) nil (let* ((-explainer- (and t (ert--get-explainer 'equal)))) (if -explainer- (list :explanation (apply -explainer- args-1)) nil))))) (ert--signal-should-execution form-description-4)) nil (ert-fail form-description-4)))   (let ((value-2 'ert-form-evaluation-aborted-3)) (let (form-description-4) (if (unwind-protect (setq value-2 (apply fn-0 args-1)) (setq form-description-4 (nconc (list '(should (equal nil 42))) (list :form (cons fn-0 args-1)) (if (eql value-2 'ert-form-evaluation-aborted-3) nil (list :value value-2)) (if (eql value-2 'ert-form-evaluation-aborted-3) nil (let* ((-explainer- (and t (ert--get-explainer 'equal)))) (if -explainer- (list :explanation (apply -explainer- args-1)) nil))))) (ert--signal-should-execution form-description-4)) nil (ert-fail form-description-4))) value-2)   (let* ((fn-0 #'#) (args-1 (condition-case err (let ((signal-hook-function #'ert--should-signal-hook)) (list nil 42)) (error (progn (setq fn-0 #'signal) (list (car err) (cdr err))))))) (let ((value-2 'ert-form-evaluation-aborted-3)) (let (form-description-4) (if (unwind-protect (setq value-2 (apply fn-0 args-1)) (setq form-description-4 (nconc (list '(should (equal nil 42))) (list :form (cons fn-0 args-1)) (if (eql value-2 'ert-form-evaluation-aborted-3) nil (list :value value-2)) (if (eql value-2 'ert-form-evaluation-aborted-3) nil (let* ((-explainer- (and t (ert--get-explainer 'equal)))) (if -explainer- (list :explanation (apply -explainer- args-1)) nil))))) (ert--signal-should-execution form-description-4)) nil (ert-fail form-description-4))) value-2))   (progn (let* ((fn-0 #'#) (args-1 (condition-case err (let ((signal-hook-function #'ert--should-signal-hook)) (list nil 42)) (error (progn (setq fn-0 #'signal) (list (car err) (cdr err))))))) (let ((value-2 'ert-form-evaluation-aborted-3)) (let (form-description-4) (if (unwind-protect (setq value-2 (apply fn-0 args-1)) (setq form-description-4 (nconc (list '(should (equal nil 42))) (list :form (cons fn-0 args-1)) (if (eql value-2 'ert-form-evaluation-aborted-3) nil (list :value value-2)) (if (eql value-2 'ert-form-evaluation-aborted-3) nil (let* ((-explainer- (and t (ert--get-explainer 'equal)))) (if -explainer- (list :explanation (apply -explainer- args-1)) nil))))) (ert--signal-should-execution form-description-4)) nil (ert-fail form-description-4))) value-2)))   (let* ((--cl-foo-- #'(lambda (x) (list x)))) (progn (let* ((fn-0 #'#) (args-1 (condition-case err (let ((signal-hook-function #'ert--should-signal-hook)) (list nil 42)) (error (progn (setq fn-0 #'signal) (list (car err) (cdr err))))))) (let ((value-2 'ert-form-evaluation-aborted-3)) (let (form-description-4) (if (unwind-protect (setq value-2 (apply fn-0 args-1)) (setq form-description-4 (nconc (list '(should (equal nil 42))) (list :form (cons fn-0 args-1)) (if (eql value-2 'ert-form-evaluation-aborted-3) nil (list :value value-2)) (if (eql value-2 'ert-form-evaluation-aborted-3) nil (let* ((-explainer- (and t (ert--get-explainer 'equal)))) (if -explainer- (list :explanation (apply -explainer- args-1)) nil))))) (ert--signal-should-execution form-description-4)) nil (ert-fail form-description-4))) value-2))))   test()   command-line-1(("--eval" "(byte-compile-file \"perturb.el\")" "-l" "use.el" "-f" "test"))   command-line()   normal-top-level() Invalid function: # The byte-compiler seems to have erroneously removed the symbol-function for equal. In GNU Emacs 29.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.38,  cairo version 1.16.0) of 2023-08-01, modified by Debian built on  x86-ubc-02 Windowing system distributor 'The X.Org Foundation', version 11.0.12201009 System Description: Debian GNU/Linux trixie/sid Configured using:  'configure --build x86_64-linux-gnu --prefix=/usr  --sharedstatedir=/var/lib --libexecdir=/usr/libexec  --localstatedir=/var/lib --infodir=/usr/share/info  --mandir=/usr/share/man --with-libsystemd --with-pop=yes  --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/29.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/29.1/site-lisp:/usr/share/emacs/site-lisp  --with-sound=alsa --without-gconf --with-mailutils  --with-native-compilation --build x86_64-linux-gnu --prefix=/usr  --sharedstatedir=/var/lib --libexecdir=/usr/libexec  --localstatedir=/var/lib --infodir=/usr/share/info  --mandir=/usr/share/man --with-libsystemd --with-pop=yes  --enable-locallisppath=/etc/emacs:/usr/local/share/emacs/29.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/29.1/site-lisp:/usr/share/emacs/site-lisp  --with-sound=alsa --without-gconf --with-mailutils  --with-native-compilation --with-cairo --with-x=yes  --with-x-toolkit=gtk3 --with-toolkit-scroll-bars 'CFLAGS=-g -O2  -ffile-prefix-map=/build/reproducible-path/emacs-29.1+1=.  -fstack-protector-strong -Wformat -Werror=format-security -Wall'  'CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2' LDFLAGS=-Wl,-z,relro' Configured features: ACL CAIRO DBUS FREETYPE GIF GLIB GMP GNUTLS GPM GSETTINGS HARFBUZZ JPEG JSON LCMS2 LIBOTF LIBSELINUX LIBSYSTEMD LIBXML2 M17N_FLT MODULES NATIVE_COMP NOTIFY INOTIFY PDUMPER PNG RSVG SECCOMP SOUND SQLITE3 THREADS TIFF TOOLKIT_SCROLL_BARS TREE_SITTER WEBP X11 XDBE XIM XINPUT2 XPM GTK3 ZLIB