From debbugs-submit-bounces@debbugs.gnu.org Tue Feb 28 19:14:11 2023 Received: (at submit) by debbugs.gnu.org; 1 Mar 2023 00:14:11 +0000 Received: from localhost ([127.0.0.1]:52210 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXA6k-0000k4-QJ for submit@debbugs.gnu.org; Tue, 28 Feb 2023 19:14:11 -0500 Received: from lists.gnu.org ([209.51.188.17]:38978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXA6j-0000jw-4Y for submit@debbugs.gnu.org; Tue, 28 Feb 2023 19:14:09 -0500 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 1pXA6h-0007pj-HZ for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 19:14:07 -0500 Received: from mail.sergiodj.net ([167.114.15.217]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pXA6e-0000r1-Ib for bug-gnu-emacs@gnu.org; Tue, 28 Feb 2023 19:14:06 -0500 Received: from localhost (unknown [IPv6:2607:f2c0:ed84:d00:916b:3313:b96:ffb2]) by mail.sergiodj.net (Postfix) with ESMTPSA id DE371A019D for ; Tue, 28 Feb 2023 19:13:58 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sergiodj.net; s=20160602; t=1677629639; bh=fY1bis3ZJAF+ZNZ0DDns513EGT/4eFqJDFA5zTmUagU=; h=From:To:Subject:Date:From; b=lRhx73Ndsbyw1RtTShoBxEk099upTx+8HNcJRcV+G8HE7vSl1sS48YD+Pvbdl1L1J zvgMUwC7vrBePuam9yd+a7UEGWtIsnXSkKaTNcagck46cUpNf5+ZzVpL4rlb/VSpBa ZrUfu+M9BTkLKrKS/m22Ddg9mQW6U/e5e8uWgPho= From: Sergio Durigan Junior To: bug-gnu-emacs@gnu.org Subject: Native compilation fails to generate trampolines on certain scenarios X-URL: http://blog.sergiodj.net Date: Tue, 28 Feb 2023 19:13:58 -0500 Message-ID: <877cw1l455.fsf@sergiodj.net> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=167.114.15.217; envelope-from=sergiodj@sergiodj.net; helo=mail.sergiodj.net 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, 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 Content-Transfer-Encoding: quoted-printable Hello, While investigating a few bugs affecting Debian's and Ubuntu's Emacs packages (for example, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=3D1028725), I stumbled upon a problem that's affecting native compilation on Emacs 28.1+, currently reproducible with git master as well. I haven't been able to fully understand why the problem is happening, but when there are two primitive functions (that would become trampolines) being used sequentially, Emacs doesn't generate the corresponding .eln file for the second function. I spent some time investigating the problem and came up with a "minimal" reproducer: =2D-8<---------------cut here---------------start------------->8--- (require 'cl-lib) (defmacro foo--flet (funcs &rest body) "Like `cl-flet' but with dynamic function scope." (declare (indent 1))=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20 (let* ((names (mapcar #'car funcs)) (lambdas (mapcar #'cdr funcs)) (gensyms (cl-loop for name in names collect (make-symbol (symbol-name name))))) `(let ,(cl-loop for name in names for gensym in gensyms collect `(,gensym (symbol-function ',name))) (unwind-protect (progn ,@(cl-loop for name in names for lambda in lambdas for body =3D `(lambda ,@lambda) collect `(setf (symbol-function ',name) ,body)) ,@body) ,@(cl-loop for name in names for gensym in gensyms collect `(setf (symbol-function ',name) ,gensym)))))) (defun bar (file) (and (file-exists-p file) (file-readable-p file))) (defun test () (foo--flet ((file-exists-p (file) t) (file-readable-p (file) nil)) (message "%s" (bar "/home/sergio/.lesshst")))) =2D-8<---------------cut here---------------end--------------->8--- When I run it using the following Emacs: =2D-8<---------------cut here---------------start------------->8--- GNU Emacs 30.0.50 Development version 68cc286c0495 on master branch; build date 2023-02-28. =2D-8<---------------cut here---------------end--------------->8--- here is the output I see: =2D-8<---------------cut here---------------start------------->8--- $ emacs -batch -Q -l t.el -f test -L . Error: native-lisp-load-failed ("file does not exists" "/home/sergio/.emacs= .d/eln-cache/30.0.50-23de7b18/subr--trampoline-66696c652d7265616461626c652d= 70_file_readable_p_0.eln") debug-early-backtrace() debug-early(error (native-lisp-load-failed "file does not exists" "/home/= sergio/.emacs.d/eln-cache/30.0.50-23de7b18/subr--trampoline-66696c652d72656= 16461626c652d70_file_readable_p_0.eln")) native-elisp-load("/home/sergio/.emacs.d/eln-cache/30.0.50-23de7b18/subr-= -trampoline-66696c652d7265616461626c652d70_file_readable_p_0.eln") comp-trampoline-search(file-readable-p) comp-subr-trampoline-install(file-readable-p) fset(file-readable-p (lambda (file) nil)) (progn (fset 'file-exists-p #'(lambda (file) t)) (fset 'file-readable-p #= '(lambda (file) nil)) (message "%s" (bar "/home/sergio/.lesshst"))) (unwind-protect (progn (fset 'file-exists-p #'(lambda (file) t)) (fset 'f= ile-readable-p #'(lambda (file) nil)) (message "%s" (bar "/home/sergio/.les= shst"))) (fset 'file-exists-p file-exist s-p) (fset 'file-readable-p file-readable-p)) (let ((file-exists-p (symbol-function 'file-exists-p)) (file-readable-p (= symbol-function 'file-readable-p))) (unwind-protect (progn (fset 'file-exis= ts-p #'(lambda (file) t)) (fset 'file-re adable-p #'(lambda (file) nil)) (message "%s" (bar "/home/sergio/.lesshst")= )) (fset 'file-exists-p file-exists-p) (fset 'file-readable-p file-readable= -p))) test() command-line-1(("-l" "t.el" "-f" "test" "-L" ".")) command-line() normal-top-level() Native elisp load failed: "file does not exists", "/home/sergio/.emacs.d/el= n-cache/30.0.50-23de7b18/subr--trampoline-66696c652d7265616461626c652d70_fi= le_readable_p_0.eln" =2D-8<---------------cut here---------------end--------------->8--- Do note that this is already affecting a few packages, like buttercup (see https://github.com/jorgenschaefer/emacs-buttercup/issues/230) and emacs-web-server, for example. Please let me know if you need more information regarding the problem. Thank you, =2D-=20 Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible https://sergiodj.net/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEI3pUsQKHKL8A7zH00Ot2KGX8XjYFAmP+mMYACgkQ0Ot2KGX8 XjYBlA//bA7gohJluKWD2juNgSPG1lFFSf+I4OlX5uAkd9HG9p1sWA3LRrTV4WGZ Hv8oGKLaXHrwJqueWYAH/oRJZ2fgpEBLnRCbXh2JJu5zVTt0E8ICi+qrm0Zcu1MV 1lfLTAI4AfInIQ6u9sEP/lBrnaMxjqpWtMvcKaV30Do/4yWyd5iB52FZzbRs7cG+ s+7Ybmi1bnZfLm1nudtmwxIKJCOd/zTA4qE3iTdrsr1x7v50KDK8wwT0aGciLMHE U0q+8gGnJkeLyp/MPkYKAL1ht/Na6TtFMWIHz2A3Gnds0F56OgddsbqiOE6hdQ70 xIRh2A81jn9WoYDXe794SktxEsrpAJ6qgjSwi2KnvuNLW7NaaPLPnlQvxqu6dGMS fRkyB3THswGWMT0yiTFNJINxohc2P6X82l3Qqwsxaoi/5LU198BweWRH3cegPD9R Dhwtj177ESGJ3bOE2/mMhLfL+WYLyCZUXy2xEnhszDMQ/NqbsdcyrYjDi61XW9h3 wsChJGSNzzPnEmxbMKeyEcGYbut3tzpTD2/Drml+9xqYj74KspHxoRKZJGr8BEmY VVjjHVrGwUmfesfKNBUIWqhGVH6wHiUebDhsRdHkHsjHC+yEJFwcUBDavQVFrHU/ dynas2kFF2meE7L3qvzPPOOykBrGLhyXHqcQi9mMSk37WPp1CQk= =Edby -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 01 07:26:55 2023 Received: (at 61880) by debbugs.gnu.org; 1 Mar 2023 12:26:55 +0000 Received: from localhost ([127.0.0.1]:52931 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXLXq-00062F-Tm for submit@debbugs.gnu.org; Wed, 01 Mar 2023 07:26:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57350) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXLXo-00061z-6Y for 61880@debbugs.gnu.org; Wed, 01 Mar 2023 07:26:53 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXLXh-0007sy-Ef; Wed, 01 Mar 2023 07:26:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=fVhL4f6LrE6ybuiaP4amUIhW0plDXT1e2K+i1VJ6fCU=; b=OEPufBrMpHnf JiXUrwW7jrffFCKWO7vq68MKQ/4Sb0VK/JfEz7jUxNBam2zT/1eHjq9wYS5Qhh/MiScgb3EWVc/OX WpJntaOXrAPQqb1fwXAdYCUGfWjkinxKlogA8/QEMxYPj9p8Y+q8P1e7+hHJVQLM1PPhCnjBxZDfj cLNNU1P1H0Be0WVuFln3H4tZTiPVQ/KAURUVmkbxAIlXzqkMmTJbCI61JpwVhN6W2ZaT8hlFCZMkP k76bu8pPgy2I98zOZ1CotmUNC0oicpMRknX8xMangpzVwkTbdNyV3OaLsmrEkN3f30/4LrxrNZtV9 dMf8nXBx40Y+ZpX4pnOyUw==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXLXg-0006hG-Hp; Wed, 01 Mar 2023 07:26:45 -0500 Date: Wed, 01 Mar 2023 14:26:57 +0200 Message-Id: <83sfeofyi6.fsf@gnu.org> From: Eli Zaretskii To: Sergio Durigan Junior , Andrea Corallo In-Reply-To: <877cw1l455.fsf@sergiodj.net> (message from Sergio Durigan Junior on Tue, 28 Feb 2023 19:13:58 -0500) Subject: Re: bug#61880: Native compilation fails to generate trampolines on certain scenarios References: <877cw1l455.fsf@sergiodj.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61880 Cc: 61880@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 (---) > From: Sergio Durigan Junior > Date: Tue, 28 Feb 2023 19:13:58 -0500 > > While investigating a few bugs affecting Debian's and Ubuntu's Emacs > packages (for example, > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1028725), I stumbled > upon a problem that's affecting native compilation on Emacs 28.1+, > currently reproducible with git master as well. > > I haven't been able to fully understand why the problem is happening, > but when there are two primitive functions (that would become > trampolines) being used sequentially, Emacs doesn't generate the > corresponding .eln file for the second function. > > I spent some time investigating the problem and came up with a "minimal" > reproducer: > > --8<---------------cut here---------------start------------->8--- > (require 'cl-lib) > > (defmacro foo--flet (funcs &rest body) > "Like `cl-flet' but with dynamic function scope." > (declare (indent 1)) > (let* ((names (mapcar #'car funcs)) > (lambdas (mapcar #'cdr funcs)) > (gensyms (cl-loop for name in names > collect (make-symbol (symbol-name name))))) > `(let ,(cl-loop for name in names > for gensym in gensyms > collect `(,gensym (symbol-function ',name))) > (unwind-protect > (progn > ,@(cl-loop for name in names > for lambda in lambdas > for body = `(lambda ,@lambda) > collect `(setf (symbol-function ',name) ,body)) > ,@body) > ,@(cl-loop for name in names > for gensym in gensyms > collect `(setf (symbol-function ',name) ,gensym)))))) > > (defun bar (file) > (and (file-exists-p file) (file-readable-p file))) > > (defun test () > (foo--flet ((file-exists-p (file) t) > (file-readable-p (file) nil)) > (message "%s" (bar "/home/sergio/.lesshst")))) > --8<---------------cut here---------------end--------------->8--- > > When I run it using the following Emacs: > > --8<---------------cut here---------------start------------->8--- > GNU Emacs 30.0.50 > Development version 68cc286c0495 on master branch; build date 2023-02-28. > --8<---------------cut here---------------end--------------->8--- > > here is the output I see: > > --8<---------------cut here---------------start------------->8--- > $ emacs -batch -Q -l t.el -f test -L . > Error: native-lisp-load-failed ("file does not exists" "/home/sergio/.emacs.d/eln-cache/30.0.50-23de7b18/subr--trampoline-66696c652d7265616461626c652d70_file_readable_p_0.eln") > debug-early-backtrace() > debug-early(error (native-lisp-load-failed "file does not exists" "/home/sergio/.emacs.d/eln-cache/30.0.50-23de7b18/subr--trampoline-66696c652d7265616461626c652d70_file_readable_p_0.eln")) > native-elisp-load("/home/sergio/.emacs.d/eln-cache/30.0.50-23de7b18/subr--trampoline-66696c652d7265616461626c652d70_file_readable_p_0.eln") > comp-trampoline-search(file-readable-p) > comp-subr-trampoline-install(file-readable-p) > fset(file-readable-p (lambda (file) nil)) > (progn (fset 'file-exists-p #'(lambda (file) t)) (fset 'file-readable-p #'(lambda (file) nil)) (message "%s" (bar "/home/sergio/.lesshst"))) > (unwind-protect (progn (fset 'file-exists-p #'(lambda (file) t)) (fset 'file-readable-p #'(lambda (file) nil)) (message "%s" (bar "/home/sergio/.lesshst"))) (fset 'file-exists-p file-exist > s-p) (fset 'file-readable-p file-readable-p)) > (let ((file-exists-p (symbol-function 'file-exists-p)) (file-readable-p (symbol-function 'file-readable-p))) (unwind-protect (progn (fset 'file-exists-p #'(lambda (file) t)) (fset 'file-re > adable-p #'(lambda (file) nil)) (message "%s" (bar "/home/sergio/.lesshst"))) (fset 'file-exists-p file-exists-p) (fset 'file-readable-p file-readable-p))) > test() > command-line-1(("-l" "t.el" "-f" "test" "-L" ".")) > command-line() > normal-top-level() > Native elisp load failed: "file does not exists", "/home/sergio/.emacs.d/eln-cache/30.0.50-23de7b18/subr--trampoline-66696c652d7265616461626c652d70_file_readable_p_0.eln" > --8<---------------cut here---------------end--------------->8--- > > Do note that this is already affecting a few packages, like buttercup > (see https://github.com/jorgenschaefer/emacs-buttercup/issues/230) and > emacs-web-server, for example. > > Please let me know if you need more information regarding the problem. Thanks. Andrea, can you please look into this? I guess if this happens in Emacs 28 and on master, it also affects Emacs 29, so I hope this can be fixed quickly and safely. TIA. From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 01 18:14:10 2023 Received: (at 61880) by debbugs.gnu.org; 1 Mar 2023 23:14:10 +0000 Received: from localhost ([127.0.0.1]:55237 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXVeE-0003zc-5O for submit@debbugs.gnu.org; Wed, 01 Mar 2023 18:14:10 -0500 Received: from mail.sergiodj.net ([167.114.15.217]:38982) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXVeC-0003zJ-Vi for 61880@debbugs.gnu.org; Wed, 01 Mar 2023 18:14:09 -0500 Received: from localhost (unknown [IPv6:2607:f2c0:ed84:d00:7add:a205:1965:1a51]) by mail.sergiodj.net (Postfix) with ESMTPSA id E117CA011E; Wed, 1 Mar 2023 18:14:01 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sergiodj.net; s=20160602; t=1677712442; bh=GF7Ku5U4xSCp2pRuc+bfLZBunVq+hIiPtfTcnve7xqM=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=DFhOOaUdVNSMQM2NFfm+LNWnvni+ODpsd3H3AAZpFgXOb8OWsutUHslwRW62c1NZu 89tK0x5VHbTMTgod+OCOXm6C6r6mFbXk4zbjXNIH3+YEifSLfIE1DMzy0n2R4cM/6r eYCnxro1HB+yJmcshJk1BScT3Z+bHdJZ14zBb23o= From: Sergio Durigan Junior To: Andrea Corallo Subject: Re: bug#61880: Native compilation fails to generate trampolines on certain scenarios In-Reply-To: (Andrea Corallo's message of "Wed, 01 Mar 2023 22:46:13 +0000") References: <877cw1l455.fsf@sergiodj.net> <83sfeofyi6.fsf@gnu.org> X-URL: http://blog.sergiodj.net Date: Wed, 01 Mar 2023 18:14:01 -0500 Message-ID: <87edq8hxom.fsf@sergiodj.net> 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: 61880 Cc: Eli Zaretskii , 61880@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 Wednesday, March 01 2023, Andrea Corallo wrote: > Eli Zaretskii writes: > >>> From: Sergio Durigan Junior >>> Date: Tue, 28 Feb 2023 19:13:58 -0500 >>> >>> While investigating a few bugs affecting Debian's and Ubuntu's Emacs >>> packages (for example, >>> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1028725), I stumbled >>> upon a problem that's affecting native compilation on Emacs 28.1+, >>> currently reproducible with git master as well. >>> >>> I haven't been able to fully understand why the problem is happening, >>> but when there are two primitive functions (that would become >>> trampolines) being used sequentially, Emacs doesn't generate the >>> corresponding .eln file for the second function. >>> >>> I spent some time investigating the problem and came up with a "minimal" >>> reproducer: >>> >>> --8<---------------cut here---------------start------------->8--- >>> (require 'cl-lib) >>> >>> (defmacro foo--flet (funcs &rest body) >>> "Like `cl-flet' but with dynamic function scope." >>> (declare (indent 1)) >>> (let* ((names (mapcar #'car funcs)) >>> (lambdas (mapcar #'cdr funcs)) >>> (gensyms (cl-loop for name in names >>> collect (make-symbol (symbol-name name))))) >>> `(let ,(cl-loop for name in names >>> for gensym in gensyms >>> collect `(,gensym (symbol-function ',name))) >>> (unwind-protect >>> (progn >>> ,@(cl-loop for name in names >>> for lambda in lambdas >>> for body = `(lambda ,@lambda) >>> collect `(setf (symbol-function ',name) ,body)) >>> ,@body) >>> ,@(cl-loop for name in names >>> for gensym in gensyms >>> collect `(setf (symbol-function ',name) ,gensym)))))) >>> >>> (defun bar (file) >>> (and (file-exists-p file) (file-readable-p file))) >>> >>> (defun test () >>> (foo--flet ((file-exists-p (file) t) >>> (file-readable-p (file) nil)) >>> (message "%s" (bar "/home/sergio/.lesshst")))) >>> --8<---------------cut here---------------end--------------->8--- >>> >>> When I run it using the following Emacs: >>> >>> --8<---------------cut here---------------start------------->8--- >>> GNU Emacs 30.0.50 >>> Development version 68cc286c0495 on master branch; build date 2023-02-28. >>> --8<---------------cut here---------------end--------------->8--- >>> >>> here is the output I see: >>> >>> --8<---------------cut here---------------start------------->8--- >>> $ emacs -batch -Q -l t.el -f test -L . >>> Error: native-lisp-load-failed ("file does not exists" "/home/sergio/.emacs.d/eln-cache/30.0.50-23de7b18/subr--trampoline-66696c652d7265616461626c652d70_file_readable_p_0.eln") >>> debug-early-backtrace() >>> debug-early(error (native-lisp-load-failed "file does not exists" "/home/sergio/.emacs.d/eln-cache/30.0.50-23de7b18/subr--trampoline-66696c652d7265616461626c652d70_file_readable_p_0.eln")) >>> native-elisp-load("/home/sergio/.emacs.d/eln-cache/30.0.50-23de7b18/subr--trampoline-66696c652d7265616461626c652d70_file_readable_p_0.eln") >>> comp-trampoline-search(file-readable-p) >>> comp-subr-trampoline-install(file-readable-p) >>> fset(file-readable-p (lambda (file) nil)) >>> (progn (fset 'file-exists-p #'(lambda (file) t)) (fset 'file-readable-p #'(lambda (file) nil)) (message "%s" (bar "/home/sergio/.lesshst"))) >>> (unwind-protect (progn (fset 'file-exists-p #'(lambda (file) t)) (fset 'file-readable-p #'(lambda (file) nil)) (message "%s" (bar "/home/sergio/.lesshst"))) (fset 'file-exists-p file-exist >>> s-p) (fset 'file-readable-p file-readable-p)) >>> (let ((file-exists-p (symbol-function 'file-exists-p)) (file-readable-p (symbol-function 'file-readable-p))) (unwind-protect (progn (fset 'file-exists-p #'(lambda (file) t)) (fset 'file-re >>> adable-p #'(lambda (file) nil)) (message "%s" (bar "/home/sergio/.lesshst"))) (fset 'file-exists-p file-exists-p) (fset 'file-readable-p file-readable-p))) >>> test() >>> command-line-1(("-l" "t.el" "-f" "test" "-L" ".")) >>> command-line() >>> normal-top-level() >>> Native elisp load failed: "file does not exists", "/home/sergio/.emacs.d/eln-cache/30.0.50-23de7b18/subr--trampoline-66696c652d7265616461626c652d70_file_readable_p_0.eln" >>> --8<---------------cut here---------------end--------------->8--- >>> >>> Do note that this is already affecting a few packages, like buttercup >>> (see https://github.com/jorgenschaefer/emacs-buttercup/issues/230) and >>> emacs-web-server, for example. >>> >>> Please let me know if you need more information regarding the problem. >> >> Thanks. >> >> Andrea, can you please look into this? I guess if this happens in >> Emacs 28 and on master, it also affects Emacs 29, so I hope this can >> be fixed quickly and safely. TIA. >> > > Yep, sorry the IP of my mail provider is (temporary?) banned and I don't > receive nor emacs-bugs nor emacs-devel since a couple of days :( thanks > for Ccing me. > > So what should be going on here is that `file-exists-p' gets redefined > with a non working mock function while we are trying to compile a > trampoline for `file-readable-p' (it's redefined just afterward). Thank you for taking the time to reply and investigate this problem. > I don't think there is a trivial fix for this, we should rewrite > `comp-trampoline-search' in C in order to have it not sensitive to the > redefinition of `file-exists-p', or define another primitive like > `comp-file-exists-p' (that calls directly Ffile_exists_p from C) and use > that in `comp-trampoline-search'. This would cover this specific case > but potentially not others. Forgive my ignorance, but wouldn't we need to do that for every primitive that can be compiled into a trampoline? I say that because the error I've encountered above refers to 'file-readable-p', which doesn't seem to call 'file-exists-p'. FWIW, I did encounter the same problem with 'file-exists-p' and 'buffer-file-name' as well, which is the reason why I think solely having a 'comp-file-exists-p' wouldn't be enough. > Fact is, Emacs can't be robust against the redefinition of all > primitives (actually never was), the programmer that redefines > primitives should be ready to understand the underlying Emacs machinery, > and with native compilation this machinery changed a bit. I understand where you're coming from, but it's also important to note that this behaviour was accepted without problems until the native compilation feature came about, so it is understandable that we are getting a lot of confusing people wondering why their tests started failing now. I believe there should be more emphasis in the documentation that this problem can creep in, especially for those who are relying on redefinitions for testing purposes. > So two options: > > * The redefinition of `file-exists-p' is tipically done for test > purposes only, we accept that and for this case we suggest to run > these specific tests setting `native-comp-enable-subr-trampolines' to > nil This is what I'm currently doing in Debian/Ubuntu, and will start suggesting upstream maintainers to do the same. > * We work around this specific issue with the `comp-file-exists-p' trick > (or another one). As said above, I don't believe this will be enough for this case, but I may be completely wrong here. Thanks, -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible https://sergiodj.net/ From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 02 02:05:21 2023 Received: (at 61880) by debbugs.gnu.org; 2 Mar 2023 07:05:21 +0000 Received: from localhost ([127.0.0.1]:55646 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXd0D-0004AA-4e for submit@debbugs.gnu.org; Thu, 02 Mar 2023 02:05:21 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58168) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXd0A-00049t-A4 for 61880@debbugs.gnu.org; Thu, 02 Mar 2023 02:05:19 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXd04-0004vh-JK; Thu, 02 Mar 2023 02:05:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=kM2dfCvgdjFt5hkDQr009efRMGIwRDwIkeZvotDOckM=; b=YAwudIpDJIK7 lIVEJBp4Ugglg5ipY6Djk0WMUGd3v97/9MUVsIzRf3zCBP4wOjV/ouawWx+SfXeM6f2Pdc3VnRYa7 FDIG9tm3wyQXXWTRvMQJMJOwg9lCb5JTons3NjgCE+ECpeTCq436hT8lOfrtxsEoUyTXo9Nd1h0MP zus1+1oXhKTxap+4gF8wOdiOzRebwPBZMDzwPYFOhoj2ITEGGA4J6IY3pXydFHqVY121zxoA7E3WB oFF71eZzaDZRmaZdlZc3LdzJBhODlgy1w4lEOm6hvrHwlJile8/Heu77Ci2HRdEZbcMdT0SctyDgU qMtFnQZUjW3ZHPGv94nVkA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXd04-0004Fd-22; Thu, 02 Mar 2023 02:05:12 -0500 Date: Thu, 02 Mar 2023 09:05:27 +0200 Message-Id: <83v8jjeiq0.fsf@gnu.org> From: Eli Zaretskii To: Sergio Durigan Junior In-Reply-To: <87edq8hxom.fsf@sergiodj.net> (message from Sergio Durigan Junior on Wed, 01 Mar 2023 18:14:01 -0500) Subject: Re: bug#61880: Native compilation fails to generate trampolines on certain scenarios References: <877cw1l455.fsf@sergiodj.net> <83sfeofyi6.fsf@gnu.org> <87edq8hxom.fsf@sergiodj.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61880 Cc: 61880@debbugs.gnu.org, akrl@sdf.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 (---) > From: Sergio Durigan Junior > Cc: Eli Zaretskii , 61880@debbugs.gnu.org > Date: Wed, 01 Mar 2023 18:14:01 -0500 > > > I don't think there is a trivial fix for this, we should rewrite > > `comp-trampoline-search' in C in order to have it not sensitive to the > > redefinition of `file-exists-p', or define another primitive like > > `comp-file-exists-p' (that calls directly Ffile_exists_p from C) and use > > that in `comp-trampoline-search'. This would cover this specific case > > but potentially not others. > > Forgive my ignorance, but wouldn't we need to do that for every > primitive that can be compiled into a trampoline? That's basically what Andrea was saying by the "potentially not others" part. So you are in agreement here. > > Fact is, Emacs can't be robust against the redefinition of all > > primitives (actually never was), the programmer that redefines > > primitives should be ready to understand the underlying Emacs machinery, > > and with native compilation this machinery changed a bit. > > I understand where you're coming from, but it's also important to note > that this behaviour was accepted without problems until the native > compilation feature came about, so it is understandable that we are > getting a lot of confusing people wondering why their tests started > failing now. I believe there should be more emphasis in the > documentation that this problem can creep in, especially for those who > are relying on redefinitions for testing purposes. > > > So two options: > > > > * The redefinition of `file-exists-p' is tipically done for test > > purposes only, we accept that and for this case we suggest to run > > these specific tests setting `native-comp-enable-subr-trampolines' to > > nil > > This is what I'm currently doing in Debian/Ubuntu, and will start > suggesting upstream maintainers to do the same. I can come up with documentation of this subtlety, including a list of primitives whose redefinition could trigger these issues, if this is an acceptable solution. > > * We work around this specific issue with the `comp-file-exists-p' trick > > (or another one). > > As said above, I don't believe this will be enough for this case, but I > may be completely wrong here. You are not wrong. I don't think the 2nd alternative is what we should do. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 02 07:56:31 2023 Received: (at 61880) by debbugs.gnu.org; 2 Mar 2023 12:56:31 +0000 Received: from localhost ([127.0.0.1]:56096 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXiU2-0007EL-So for submit@debbugs.gnu.org; Thu, 02 Mar 2023 07:56:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45496) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXiU0-0007E6-Jt for 61880@debbugs.gnu.org; Thu, 02 Mar 2023 07:56:29 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXiTu-0005OU-6Z; Thu, 02 Mar 2023 07:56:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=MEhrPpVpzmonG9mwQi7C8EPasj7t/0Ep8RGfiCFUNVI=; b=Es4fP+Qxa9VK iMH8MLamRGMzatpxdWyXMfJQFk449tI5kdjSN0RfYNqgIgVCKgpEbX++CwjxIkFSD7q12ynnkI8v+ XMNvWIGyYM9fJwAx8zLcjpIL9I6COK+qkc15GOI1iaM1dHuQP3sC8ZVWRfE5SHzxPOL0bYqBFfbcQ qgFS5PM8e5PBX3bMvZWfT3mEUwBbn1nuS54RN1+9NB90WYjww9s92eOx/mjfoT4yAUdYr6mBDPq/I 8/1piEo/RsSoZLrj6SD5ayBZ+gMkn/+4pwF1z7GapOyTLA72mHt4Dz2CEIVS0Hjy29YzkT0UwH2VF AhDcudUv0mIDy+YX5NTu6A==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXiTl-0004F3-QZ; Thu, 02 Mar 2023 07:56:21 -0500 Date: Thu, 02 Mar 2023 14:55:55 +0200 Message-Id: <834jr3e2hw.fsf@gnu.org> From: Eli Zaretskii To: Andrea Corallo In-Reply-To: (message from Andrea Corallo on Thu, 02 Mar 2023 11:47:43 +0000) Subject: Re: bug#61880: Native compilation fails to generate trampolines on certain scenarios References: <877cw1l455.fsf@sergiodj.net> <83sfeofyi6.fsf@gnu.org> <87edq8hxom.fsf@sergiodj.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61880 Cc: sergiodj@sergiodj.net, 61880@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 (---) > From: Andrea Corallo > Cc: Eli Zaretskii , 61880@debbugs.gnu.org > Date: Thu, 02 Mar 2023 11:47:43 +0000 > > >> * The redefinition of `file-exists-p' is tipically done for test > >> purposes only, we accept that and for this case we suggest to run > >> these specific tests setting `native-comp-enable-subr-trampolines' to > >> nil > > > > This is what I'm currently doing in Debian/Ubuntu, and will start > > suggesting upstream maintainers to do the same. > > Note, I think this should be suggested only for tests redefining > `file-exists-p'. Are you saying that file-exists-p is the only primitive whose redefinition could screw generation of trampolines that follows? I though redefinition of additional primitives could potentially cause similar problems. Basically, any primitives that are called by the code which is involved in producing a trampoline. Was I mistaken? From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 02 18:51:00 2023 Received: (at 61880) by debbugs.gnu.org; 2 Mar 2023 23:51:00 +0000 Received: from localhost ([127.0.0.1]:59227 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXshP-0006cy-R5 for submit@debbugs.gnu.org; Thu, 02 Mar 2023 18:51:00 -0500 Received: from mail.sergiodj.net ([167.114.15.217]:59166) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXshN-0006cf-AM for 61880@debbugs.gnu.org; Thu, 02 Mar 2023 18:50:58 -0500 Received: from localhost (unknown [IPv6:2607:f2c0:ed84:d00:694f:48a1:de49:29be]) by mail.sergiodj.net (Postfix) with ESMTPSA id 9C096A007D; Thu, 2 Mar 2023 18:50:50 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sergiodj.net; s=20160602; t=1677801050; bh=n91snxJsO2sKH5siz43XQznH/BG6tcyzvBGqDkJZWNw=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=K+dRLN09hE9Y43rIvjX+ubhI+JU4idy4PYIIaYn8fp3fvWnZC7j7eyW+aKTW6YKSM GY6/BJuEo0kWGVemtRkAefWyrrNUc16xlnu3t72bQtGlMWxoUP5jh0C9uskq0ktZwV Wp2N5njX35PCHwcP3mR0SHuH1LorMBZPNvxI9MJE= From: Sergio Durigan Junior To: Andrea Corallo Subject: Re: bug#61880: Native compilation fails to generate trampolines on certain scenarios In-Reply-To: (Andrea Corallo's message of "Thu, 02 Mar 2023 11:47:43 +0000") References: <877cw1l455.fsf@sergiodj.net> <83sfeofyi6.fsf@gnu.org> <87edq8hxom.fsf@sergiodj.net> X-URL: http://blog.sergiodj.net Date: Thu, 02 Mar 2023 18:50:50 -0500 Message-ID: <87a60uemqt.fsf@sergiodj.net> 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: 61880 Cc: Eli Zaretskii , 61880@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 Thursday, March 02 2023, Andrea Corallo wrote: > Sergio Durigan Junior writes: > >> On Wednesday, March 01 2023, Andrea Corallo wrote: >> >>> Eli Zaretskii writes: >>> >>>>> From: Sergio Durigan Junior >>>>> Date: Tue, 28 Feb 2023 19:13:58 -0500 >>>>> >>>>> While investigating a few bugs affecting Debian's and Ubuntu's Emacs >>>>> packages (for example, >>>>> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1028725), I stumbled >>>>> upon a problem that's affecting native compilation on Emacs 28.1+, >>>>> currently reproducible with git master as well. >>>>> >>>>> I haven't been able to fully understand why the problem is happening, >>>>> but when there are two primitive functions (that would become >>>>> trampolines) being used sequentially, Emacs doesn't generate the >>>>> corresponding .eln file for the second function. >>>>> >>>>> I spent some time investigating the problem and came up with a "minimal" >>>>> reproducer: >>>>> >>>>> --8<---------------cut here---------------start------------->8--- >>>>> (require 'cl-lib) >>>>> >>>>> (defmacro foo--flet (funcs &rest body) >>>>> "Like `cl-flet' but with dynamic function scope." >>>>> (declare (indent 1)) >>>>> (let* ((names (mapcar #'car funcs)) >>>>> (lambdas (mapcar #'cdr funcs)) >>>>> (gensyms (cl-loop for name in names >>>>> collect (make-symbol (symbol-name name))))) >>>>> `(let ,(cl-loop for name in names >>>>> for gensym in gensyms >>>>> collect `(,gensym (symbol-function ',name))) >>>>> (unwind-protect >>>>> (progn >>>>> ,@(cl-loop for name in names >>>>> for lambda in lambdas >>>>> for body = `(lambda ,@lambda) >>>>> collect `(setf (symbol-function ',name) ,body)) >>>>> ,@body) >>>>> ,@(cl-loop for name in names >>>>> for gensym in gensyms >>>>> collect `(setf (symbol-function ',name) ,gensym)))))) >>>>> >>>>> (defun bar (file) >>>>> (and (file-exists-p file) (file-readable-p file))) >>>>> >>>>> (defun test () >>>>> (foo--flet ((file-exists-p (file) t) >>>>> (file-readable-p (file) nil)) >>>>> (message "%s" (bar "/home/sergio/.lesshst")))) >>>>> --8<---------------cut here---------------end--------------->8--- >>>>> >>>>> When I run it using the following Emacs: >>>>> >>>>> --8<---------------cut here---------------start------------->8--- >>>>> GNU Emacs 30.0.50 >>>>> Development version 68cc286c0495 on master branch; build date 2023-02-28. >>>>> --8<---------------cut here---------------end--------------->8--- >>>>> >>>>> here is the output I see: >>>>> >>>>> --8<---------------cut here---------------start------------->8--- >>>>> $ emacs -batch -Q -l t.el -f test -L . >>>>> Error: native-lisp-load-failed ("file does not exists" "/home/sergio/.emacs.d/eln-cache/30.0.50-23de7b18/subr--trampoline-66696c652d7265616461626c652d70_file_readable_p_0.eln") >>>>> debug-early-backtrace() >>>>> debug-early(error (native-lisp-load-failed "file does not exists" "/home/sergio/.emacs.d/eln-cache/30.0.50-23de7b18/subr--trampoline-66696c652d7265616461626c652d70_file_readable_p_0.eln")) >>>>> native-elisp-load("/home/sergio/.emacs.d/eln-cache/30.0.50-23de7b18/subr--trampoline-66696c652d7265616461626c652d70_file_readable_p_0.eln") >>>>> comp-trampoline-search(file-readable-p) >>>>> comp-subr-trampoline-install(file-readable-p) >>>>> fset(file-readable-p (lambda (file) nil)) >>>>> (progn (fset 'file-exists-p #'(lambda (file) t)) (fset 'file-readable-p #'(lambda (file) nil)) (message "%s" (bar "/home/sergio/.lesshst"))) >>>>> (unwind-protect (progn (fset 'file-exists-p #'(lambda (file) t)) (fset 'file-readable-p #'(lambda (file) nil)) (message "%s" (bar "/home/sergio/.lesshst"))) (fset 'file-exists-p file-exist >>>>> s-p) (fset 'file-readable-p file-readable-p)) >>>>> (let ((file-exists-p (symbol-function 'file-exists-p)) (file-readable-p (symbol-function 'file-readable-p))) (unwind-protect (progn (fset 'file-exists-p #'(lambda (file) t)) (fset 'file-re >>>>> adable-p #'(lambda (file) nil)) (message "%s" (bar "/home/sergio/.lesshst"))) (fset 'file-exists-p file-exists-p) (fset 'file-readable-p file-readable-p))) >>>>> test() >>>>> command-line-1(("-l" "t.el" "-f" "test" "-L" ".")) >>>>> command-line() >>>>> normal-top-level() >>>>> Native elisp load failed: "file does not exists", "/home/sergio/.emacs.d/eln-cache/30.0.50-23de7b18/subr--trampoline-66696c652d7265616461626c652d70_file_readable_p_0.eln" >>>>> --8<---------------cut here---------------end--------------->8--- >>>>> >>>>> Do note that this is already affecting a few packages, like buttercup >>>>> (see https://github.com/jorgenschaefer/emacs-buttercup/issues/230) and >>>>> emacs-web-server, for example. >>>>> >>>>> Please let me know if you need more information regarding the problem. >>>> >>>> Thanks. >>>> >>>> Andrea, can you please look into this? I guess if this happens in >>>> Emacs 28 and on master, it also affects Emacs 29, so I hope this can >>>> be fixed quickly and safely. TIA. >>>> >>> >>> Yep, sorry the IP of my mail provider is (temporary?) banned and I don't >>> receive nor emacs-bugs nor emacs-devel since a couple of days :( thanks >>> for Ccing me. >>> >>> So what should be going on here is that `file-exists-p' gets redefined >>> with a non working mock function while we are trying to compile a >>> trampoline for `file-readable-p' (it's redefined just afterward). >> >> Thank you for taking the time to reply and investigate this problem. >> >>> I don't think there is a trivial fix for this, we should rewrite >>> `comp-trampoline-search' in C in order to have it not sensitive to the >>> redefinition of `file-exists-p', or define another primitive like >>> `comp-file-exists-p' (that calls directly Ffile_exists_p from C) and use >>> that in `comp-trampoline-search'. This would cover this specific case >>> but potentially not others. >> >> Forgive my ignorance, but wouldn't we need to do that for every >> primitive that can be compiled into a trampoline? > > No that's only for primitives used by the trampoline machinery (and > specifically the part written in lisp). Once `file-exists-p' is > crippled the trampoline machinery is broken for all following primitives > being redefined. OK, understood. What's strange to me is the fact that there are other primitives that are affected by this problem, like 'buffer-file-name' and 'file-readable-p', but they don't seem to call 'file-exists-p'. >> I say that because >> the error I've encountered above refers to 'file-readable-p', which >> doesn't seem to call 'file-exists-p'. FWIW, I did encounter the same >> problem with 'file-exists-p' and 'buffer-file-name' as well, which is >> the reason why I think solely having a 'comp-file-exists-p' wouldn't be >> enough. >> >>> Fact is, Emacs can't be robust against the redefinition of all >>> primitives (actually never was), the programmer that redefines >>> primitives should be ready to understand the underlying Emacs machinery, >>> and with native compilation this machinery changed a bit. >> >> I understand where you're coming from, but it's also important to note >> that this behaviour was accepted without problems until the native >> compilation feature came about, so it is understandable that we are >> getting a lot of confusing people wondering why their tests started >> failing now. I believe there should be more emphasis in the >> documentation that this problem can creep in, especially for those who >> are relying on redefinitions for testing purposes. > > Agree > >>> So two options: >>> >>> * The redefinition of `file-exists-p' is tipically done for test >>> purposes only, we accept that and for this case we suggest to run >>> these specific tests setting `native-comp-enable-subr-trampolines' to >>> nil >> >> This is what I'm currently doing in Debian/Ubuntu, and will start >> suggesting upstream maintainers to do the same. > > Note, I think this should be suggested only for tests redefining > `file-exists-p'. What about 'buffer-file-name' and 'file-readable-p'? -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible https://sergiodj.net/ From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 02 18:54:42 2023 Received: (at 61880) by debbugs.gnu.org; 2 Mar 2023 23:54:42 +0000 Received: from localhost ([127.0.0.1]:59231 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXskz-0006je-Qj for submit@debbugs.gnu.org; Thu, 02 Mar 2023 18:54:42 -0500 Received: from mail.sergiodj.net ([167.114.15.217]:47034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXskx-0006jL-TV for 61880@debbugs.gnu.org; Thu, 02 Mar 2023 18:54:40 -0500 Received: from localhost (unknown [IPv6:2607:f2c0:ed84:d00:694f:48a1:de49:29be]) by mail.sergiodj.net (Postfix) with ESMTPSA id B1E9BA019D; Thu, 2 Mar 2023 18:54:33 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sergiodj.net; s=20160602; t=1677801273; bh=T8KL1GyzWm6G9us0f/kbRcBqCz2YC7k444IDRQHyhCs=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=Xb0t/K+uheiQ08C9nvYpzG8MaLy+/MElYo1k1qkshQHf1lRmOPf6yfYjJq/cfsiye pM5Pa4xLMyRIZQqxN8uq0kI0/PBBpenEBq5HuLy6I8X9SpaF96EesBXH8e8AEpioub rvBZoFQ+tGgbQPnntzsb9uPefuF6maTv7kCGdWL4= From: Sergio Durigan Junior To: Eli Zaretskii Subject: Re: bug#61880: Native compilation fails to generate trampolines on certain scenarios In-Reply-To: <83v8jjeiq0.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 02 Mar 2023 09:05:27 +0200") References: <877cw1l455.fsf@sergiodj.net> <83sfeofyi6.fsf@gnu.org> <87edq8hxom.fsf@sergiodj.net> <83v8jjeiq0.fsf@gnu.org> X-URL: http://blog.sergiodj.net Date: Thu, 02 Mar 2023 18:54:33 -0500 Message-ID: <875ybiemkm.fsf@sergiodj.net> 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: 61880 Cc: 61880@debbugs.gnu.org, akrl@sdf.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 Thursday, March 02 2023, Eli Zaretskii wrote: >> From: Sergio Durigan Junior >> Cc: Eli Zaretskii , 61880@debbugs.gnu.org >> Date: Wed, 01 Mar 2023 18:14:01 -0500 >> >> > Fact is, Emacs can't be robust against the redefinition of all >> > primitives (actually never was), the programmer that redefines >> > primitives should be ready to understand the underlying Emacs machinery, >> > and with native compilation this machinery changed a bit. >> >> I understand where you're coming from, but it's also important to note >> that this behaviour was accepted without problems until the native >> compilation feature came about, so it is understandable that we are >> getting a lot of confusing people wondering why their tests started >> failing now. I believe there should be more emphasis in the >> documentation that this problem can creep in, especially for those who >> are relying on redefinitions for testing purposes. >> >> > So two options: >> > >> > * The redefinition of `file-exists-p' is tipically done for test >> > purposes only, we accept that and for this case we suggest to run >> > these specific tests setting `native-comp-enable-subr-trampolines' to >> > nil >> >> This is what I'm currently doing in Debian/Ubuntu, and will start >> suggesting upstream maintainers to do the same. > > I can come up with documentation of this subtlety, including a list of > primitives whose redefinition could trigger these issues, if this is > an acceptable solution. Yes, this would be a great first step. I wonder if there's some warning Emacs can print when it detects that a primitive is being redefined and native compilation is enabled. On the one hand, Emacs would be a bit more verbose than perhaps desirable; on the other, I think this scenario is particular enough that having a warning is OK-ish. -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible https://sergiodj.net/ From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 03 02:11:15 2023 Received: (at 61880) by debbugs.gnu.org; 3 Mar 2023 07:11:15 +0000 Received: from localhost ([127.0.0.1]:59494 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXzZT-0001eZ-2C for submit@debbugs.gnu.org; Fri, 03 Mar 2023 02:11:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50198) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pXzZR-0001eF-Ik for 61880@debbugs.gnu.org; Fri, 03 Mar 2023 02:11:14 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXzZL-0008A8-RS; Fri, 03 Mar 2023 02:11:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=OtlsdxpA6nUDCI+RwY99imCDWqWbJlnGDqvyY279kHo=; b=B5g9DSaJAVA5 AnJwiezGwoudeRgZ0y8GlupD2cFSzNeBoWxd/TsKl05OFiZZrjVpxTnAzGZBSautwH3aceOloFHcs /m2yQpGYce15ka9hwypD35xQ1K9JKzEpAE9R0UtpSpeKFgm08p5LStx41a8sWUHQRI1WPNI0XbQoZ EmgfpyNZ1UYflVjk0bKNhlqTXWZh1FdZULKzNvbzSawYGkzXEKvtjAjEvr0BQN60vEchhPsW+hz/r eRlSpotVbUtcNqcxhf29DpFaoH+hWDMEQBbDlZFtiVtQt93mwF0kFfYBqG2wbPkuR7kc4Qad6+EjA mGiL4piwHmh09bAYaJ65tg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pXzZK-0003k8-WC; Fri, 03 Mar 2023 02:11:07 -0500 Date: Fri, 03 Mar 2023 09:10:52 +0200 Message-Id: <83mt4ucnsz.fsf@gnu.org> From: Eli Zaretskii To: Sergio Durigan Junior In-Reply-To: <875ybiemkm.fsf@sergiodj.net> (message from Sergio Durigan Junior on Thu, 02 Mar 2023 18:54:33 -0500) Subject: Re: bug#61880: Native compilation fails to generate trampolines on certain scenarios References: <877cw1l455.fsf@sergiodj.net> <83sfeofyi6.fsf@gnu.org> <87edq8hxom.fsf@sergiodj.net> <83v8jjeiq0.fsf@gnu.org> <875ybiemkm.fsf@sergiodj.net> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61880 Cc: 61880@debbugs.gnu.org, akrl@sdf.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 (---) > From: Sergio Durigan Junior > Cc: akrl@sdf.org, 61880@debbugs.gnu.org > Date: Thu, 02 Mar 2023 18:54:33 -0500 > > On Thursday, March 02 2023, Eli Zaretskii wrote: > > > I can come up with documentation of this subtlety, including a list of > > primitives whose redefinition could trigger these issues, if this is > > an acceptable solution. > > Yes, this would be a great first step. I wonder if there's some warning > Emacs can print when it detects that a primitive is being redefined and > native compilation is enabled. On the one hand, Emacs would be a bit > more verbose than perhaps desirable; on the other, I think this scenario > is particular enough that having a warning is OK-ish. Emitting such a warning for every primitive that is redefined or advised could be annoying indeed, but maybe we should warn only about the few primitives that might disrupt compilation of trampolines, and only when a trampoline is compiled? Andrea, can we do something like that? From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 03 06:32:25 2023 Received: (at 61880) by debbugs.gnu.org; 3 Mar 2023 11:32:26 +0000 Received: from localhost ([127.0.0.1]:59814 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pY3eD-0002hQ-IJ for submit@debbugs.gnu.org; Fri, 03 Mar 2023 06:32:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:57532) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pY3eB-0002hC-PZ for 61880@debbugs.gnu.org; Fri, 03 Mar 2023 06:32:24 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pY3e5-0007mn-HG; Fri, 03 Mar 2023 06:32:17 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=4HBT6gv73YuduXXgDCJz/3r9FrSFa9H9Lvmew6Rqbvc=; b=lUlEwuU3bH5d +d3Otw49/6U4/TXCy9rmDvGP7bsVZJ7y/Tt5LIRuIdVUmStbviyrE3su6lbbe12N5XyPI3gn+eON3 MMBRoMYQw0nJL8EGlN/GHLUv6xXEswDaMReGgFCuWCsfV6yvg41Xe1wx8ucfbz9l7f3Qb7NydQ9eK j0kRdURSLtFMIQKkmm4Dthd2pcU/FB7GBHMdoSdXm32I7DCMxA3Pnjd51QIrE8n0HLbKPp0SDmIFa DHsOBDPgf0MDGNImBFdpk3H9vG9yVwSg5pS13LY9Mb8TtKGrSmCSU/olmylo3fwLnT6yNTDfA7AQV bq/H2m2NZM8lUQZVOGYQng==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pY3e4-0000Al-Vd; Fri, 03 Mar 2023 06:32:17 -0500 Date: Fri, 03 Mar 2023 13:32:00 +0200 Message-Id: <831qm6cbpr.fsf@gnu.org> From: Eli Zaretskii To: Andrea Corallo In-Reply-To: (message from Andrea Corallo on Fri, 03 Mar 2023 10:05:21 +0000) Subject: Re: bug#61880: Native compilation fails to generate trampolines on certain scenarios References: <877cw1l455.fsf@sergiodj.net> <83sfeofyi6.fsf@gnu.org> <87edq8hxom.fsf@sergiodj.net> <83v8jjeiq0.fsf@gnu.org> <875ybiemkm.fsf@sergiodj.net> <83mt4ucnsz.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61880 Cc: sergiodj@sergiodj.net, 61880@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 (---) > From: Andrea Corallo > Cc: Sergio Durigan Junior , 61880@debbugs.gnu.org > Date: Fri, 03 Mar 2023 10:05:21 +0000 > > Eli Zaretskii writes: > > > Emitting such a warning for every primitive that is redefined or > > advised could be annoying indeed, but maybe we should warn only about > > the few primitives that might disrupt compilation of trampolines, and > > only when a trampoline is compiled? Andrea, can we do something like > > that? > > > > I think technically should be easy to emit the warning, again the non > trivial part is to form the list of primitives to warn at redefinition > (and to keep this list updated over time!). Well, currently we don't warn at all, so even warning about some of the primitives would be an improvement, I think. > To a quick look into the trampoline machinery in comp.el I see we rely > on: > > null, memq, gethash, and, subrp, not, subr-native-elisp-p, > comp--install-trampoline, concat, if, symbolp, symbol-name, make-string, > length, aset, aref, length>, mapcar, expand-file-name, > file-name-as-directory, file-exists-p, native-elisp-load. > > Note: I haven't followed all the possible execution paths outside > comp.el. > > Should we start with these? Yes, I think we should start with those, and add more as we discover them. > PS I'll never understand why people think redefining something like `if' > would indeed break everything but they expect `file-exists-p' to be > redefinable at any point I agree. But since we are going to have a list of primitives to warn about anyway, I see no reason not to have those basic ones there, just in case someone tries to do the unimaginable, for whatever reasons. Thanks. From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 03 19:20:49 2023 Received: (at 61880) by debbugs.gnu.org; 4 Mar 2023 00:20:49 +0000 Received: from localhost ([127.0.0.1]:34253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYFdo-0005dO-Jr for submit@debbugs.gnu.org; Fri, 03 Mar 2023 19:20:48 -0500 Received: from ma.sdf.org ([205.166.94.33]:45566) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYFdj-0005dE-M1 for 61880@debbugs.gnu.org; Fri, 03 Mar 2023 19:20:47 -0500 Received: from akrl by ma.sdf.org with local (Exim 4.92) (envelope-from ) id 1pYFdh-0004p3-4a; Sat, 04 Mar 2023 00:20:41 +0000 From: Andrea Corallo To: Eli Zaretskii Subject: Re: bug#61880: Native compilation fails to generate trampolines on certain scenarios In-Reply-To: <831qm6cbpr.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 03 Mar 2023 13:32:00 +0200") References: <877cw1l455.fsf@sergiodj.net> <83sfeofyi6.fsf@gnu.org> <87edq8hxom.fsf@sergiodj.net> <83v8jjeiq0.fsf@gnu.org> <875ybiemkm.fsf@sergiodj.net> <83mt4ucnsz.fsf@gnu.org> <831qm6cbpr.fsf@gnu.org> Date: Sat, 04 Mar 2023 00:20:41 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 1.3 (+) 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: Eli Zaretskii writes: >> From: Andrea Corallo >> Cc: Sergio Durigan Junior , 61880@debbugs.gnu.org >> Date: Fri, 03 Mar 2023 10:05:21 +0000 >> >> Eli Zaretskii writes: > [...] Content analysis details: (1.3 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 1.3 RCVD_IN_VALIDITY_RPBL RBL: Relay in Validity RPBL, https://senderscore.org/blocklistlookup/ [205.166.94.33 listed in bl.score.senderscore.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record X-Debbugs-Envelope-To: 61880 Cc: sergiodj@sergiodj.net, 61880@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: 4.6 (++++) 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: Eli Zaretskii writes: >> From: Andrea Corallo >> Cc: Sergio Durigan Junior , 61880@debbugs.gnu.org >> Date: Fri, 03 Mar 2023 10:05:21 +0000 >> >> Eli Zaretskii writes: > [...] Content analysis details: (4.6 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 3.6 RCVD_IN_SBL_CSS RBL: Received via a relay in Spamhaus SBL-CSS [205.166.94.33 listed in zen.spamhaus.org] 0.7 RCVD_IN_XBL RBL: Received via a relay in Spamhaus XBL 1.3 RCVD_IN_VALIDITY_RPBL RBL: Relay in Validity RPBL, https://senderscore.org/blocklistlookup/ [205.166.94.33 listed in bl.score.senderscore.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Eli Zaretskii writes: >> From: Andrea Corallo >> Cc: Sergio Durigan Junior , 61880@debbugs.gnu.org >> Date: Fri, 03 Mar 2023 10:05:21 +0000 >> >> Eli Zaretskii writes: >> >> > Emitting such a warning for every primitive that is redefined or >> > advised could be annoying indeed, but maybe we should warn only about >> > the few primitives that might disrupt compilation of trampolines, and >> > only when a trampoline is compiled? Andrea, can we do something like >> > that? >> > >> >> I think technically should be easy to emit the warning, again the non >> trivial part is to form the list of primitives to warn at redefinition >> (and to keep this list updated over time!). > > Well, currently we don't warn at all, so even warning about some of > the primitives would be an improvement, I think. > >> To a quick look into the trampoline machinery in comp.el I see we rely >> on: >> >> null, memq, gethash, and, subrp, not, subr-native-elisp-p, >> comp--install-trampoline, concat, if, symbolp, symbol-name, make-string, >> length, aset, aref, length>, mapcar, expand-file-name, >> file-name-as-directory, file-exists-p, native-elisp-load. >> >> Note: I haven't followed all the possible execution paths outside >> comp.el. >> >> Should we start with these? > > Yes, I think we should start with those, and add more as we discover > them. BTW would you like to suggest a warning message? Should we say that redefining this primitive breaks Emacs in general or be more specific on the trampoline mechanism? I ask as I'm a little puzzled on what to say as there's certanly a ton of other primitives that when redefined breaks Emacs somewere else than the trampoline machinery, so maybe we should be not too generic if we want to have this warning also for nativecomp. At the same time I feel beeing too specific in the message would be not ideal. Best Regards Andrea From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 04 02:38:24 2023 Received: (at 61880) by debbugs.gnu.org; 4 Mar 2023 07:38:24 +0000 Received: from localhost ([127.0.0.1]:35173 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYMTH-0000Tb-Vf for submit@debbugs.gnu.org; Sat, 04 Mar 2023 02:38:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39132) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYMTG-0000TM-6N for 61880@debbugs.gnu.org; Sat, 04 Mar 2023 02:38:22 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYMTA-0000sB-E0; Sat, 04 Mar 2023 02:38:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=NixKh/OwoTWVfdroJ7U3G5Ol+h4J8Cvk1DTc5Ze8HNM=; b=qIBYVdRJ5jZb u2f6kHKmcVx/sz3DN2n/wDsiopHRm/F36qUC0Ts0sfKHNGZ3+vD4EeB5YLmC7PK66H7kQXl1GPOwr wqDkDmKifaKJYkZvm/a1DsjXOTvNcRRrqSjf+OS3LC5MhktH7NAg+oUeFF/MlxGncUUrZO+7KfWH4 GLU15F5PYjp4X8BUSCj9KXyFr2NAXRhtUohVIwkJAZmRWnQX4qQstwOHv5J/0pV0bEDCJkVj4p4Kt +9qQrDD6SmsQqOFLeiaaHN3xOiM7rsQqc4K2yXXZ6EK0eE+mHJMdtojCHVhfPXMuMVNtXBNgfLjDM vAmBUlp4oUmhXNsPX6vVLA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYMT9-0005C2-4f; Sat, 04 Mar 2023 02:38:15 -0500 Date: Sat, 04 Mar 2023 09:38:03 +0200 Message-Id: <83bkl9arvo.fsf@gnu.org> From: Eli Zaretskii To: Andrea Corallo In-Reply-To: (message from Andrea Corallo on Sat, 04 Mar 2023 00:20:41 +0000) Subject: Re: bug#61880: Native compilation fails to generate trampolines on certain scenarios References: <877cw1l455.fsf@sergiodj.net> <83sfeofyi6.fsf@gnu.org> <87edq8hxom.fsf@sergiodj.net> <83v8jjeiq0.fsf@gnu.org> <875ybiemkm.fsf@sergiodj.net> <83mt4ucnsz.fsf@gnu.org> <831qm6cbpr.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61880 Cc: sergiodj@sergiodj.net, 61880@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 (---) > From: Andrea Corallo > Cc: sergiodj@sergiodj.net, 61880@debbugs.gnu.org > Date: Sat, 04 Mar 2023 00:20:41 +0000 > > Eli Zaretskii writes: > > >> Should we start with these? > > > > Yes, I think we should start with those, and add more as we discover > > them. > > BTW would you like to suggest a warning message? Something like Redefining `%s' while compiling trampolines might fail compilation. where %s is the primitive name. > Should we say that redefining this primitive breaks Emacs in general or > be more specific on the trampoline mechanism? The latter, I think. > I ask as I'm a little puzzled on what to say as there's certanly a ton > of other primitives that when redefined breaks Emacs somewere else than > the trampoline machinery, so maybe we should be not too generic if we > want to have this warning also for nativecomp. At the same time I feel > beeing too specific in the message would be not ideal. It's true that redefining arbitrary primitive is inherently dangerous, but as long as that danger just causes the programmer shoot themselves in the foot, that is their problem. Here we are talking about a mechanism -- native compilation of primitives -- that gets activated implicitly, not by any request of the program that runs, so it's a bit different. Btw, an alternative is to automatically disable trampoline compilation if we detect one of the critical primitives redefined. Then we could say in the warning Native compilation of trampolines disabled because `%s' is redefined. WDYT about this possibility? From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 04 23:04:06 2023 Received: (at 61880) by debbugs.gnu.org; 5 Mar 2023 04:04:06 +0000 Received: from localhost ([127.0.0.1]:38179 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYfbS-0007sB-17 for submit@debbugs.gnu.org; Sat, 04 Mar 2023 23:04:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42092) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYfbQ-0007ra-Ik for 61880@debbugs.gnu.org; Sat, 04 Mar 2023 23:04:04 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYfbK-0006Nr-QO; Sat, 04 Mar 2023 23:03:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=M2VVDVCmpBomc86ZwN6O3RMFgqhatdVXTi9G2yHnqU0=; b=EPKkj5T59uSB fxuYprV9FHRxqQemD+28p9WgQ0I6MmZyF/JS/WfCaMKK4VcbHoyoUnPdUMQK2mCzR4Udpmo0gi+nb WE9OM0BHNQy5x0ugj+q+W/H9uJO4/YVbdAuPxmseKROJzDb9wzPtWPrD9Cn7C4CtYrVHGv+nQKmnl Lsx1jnIa7dpysH6CdWwXun3/corMt/A4vNJ7H67ZAa05MMfLSC621u2w50i2cT87iOnKerQS5QoGt dUhkyRtGHzMuGBg7y/zuhnA+7UBFwHPeU+quaYuY10EnkVPB2BHzL5i17uCQcPkew5SLAnWSSFyAc UwRlpvrTiwUQsT0dmBg+2A==; Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1pYfbJ-0006z2-7A; Sat, 04 Mar 2023 23:03:57 -0500 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: Eli Zaretskii In-Reply-To: <831qm6cbpr.fsf@gnu.org> (message from Eli Zaretskii on Fri, 03 Mar 2023 13:32:00 +0200) Subject: Re: bug#61880: Native compilation fails to generate trampolines on certain scenarios References: <877cw1l455.fsf@sergiodj.net> <83sfeofyi6.fsf@gnu.org> <87edq8hxom.fsf@sergiodj.net> <83v8jjeiq0.fsf@gnu.org> <875ybiemkm.fsf@sergiodj.net> <83mt4ucnsz.fsf@gnu.org> <831qm6cbpr.fsf@gnu.org> Message-Id: Date: Sat, 04 Mar 2023 23:03:57 -0500 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61880 Cc: sergiodj@sergiodj.net, 61880@debbugs.gnu.org, akrl@sdf.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: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > To a quick look into the trampoline machinery in comp.el I see we rely > > on: > > > > null, memq, gethash, and, subrp, not, subr-native-elisp-p, > > comp--install-trampoline, concat, if, symbolp, symbol-name, make-string, > > length, aset, aref, length>, mapcar, expand-file-name, > > file-name-as-directory, file-exists-p, native-elisp-load. There is nothing wrong with ignoring the return value of `aset'. That is normal. We use it like `setq'. Do not make warnings for that. It is normal to ignore return values from `if' and `and'. They are control constructs. Do not make warnings for that. The others are really functions, so ignoring their return values is slightly anomalous. It is ok to implement warnings when their values are ignored, but please do not enable these warnings by default. Give us a chance to test the warnings and see what fraction of them indicate a real reason to change the code. If we are all happy with the issuance of those warnings, thenwe can enable the warnings by default. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 05 01:29:07 2023 Received: (at 61880) by debbugs.gnu.org; 5 Mar 2023 06:29:07 +0000 Received: from localhost ([127.0.0.1]:38254 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYhrm-0003OI-M2 for submit@debbugs.gnu.org; Sun, 05 Mar 2023 01:29:06 -0500 Received: from eggs.gnu.org ([209.51.188.92]:54888) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYhrk-0003Nm-Lo for 61880@debbugs.gnu.org; Sun, 05 Mar 2023 01:29:05 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYhrd-0003b9-JP; Sun, 05 Mar 2023 01:28:57 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=yOCAf627fwzRP10NF0AMSvYKKLTthsYaCutZ1NA4VhQ=; b=quD6/mb/FHAI l+K/omBPqdtKDJhNbANDafd+XHEfJ5zfnlGKnHesLvbpKHQu+v9NkeArjcpUikGt/tOseCXLoSk8N d6YbzOjueWwnWFc0rSCxoIUpxAzA/6Zh205EUNX9jP71akK+XmU1ChMZ3ZXY4stWroDQO+WW5FDxo 0OhOPEl2aHkhhdx3t46DZ3lmcTZhhFx4SPHXQHxI+Gbbk+lgCEYQ6OqvtBP/5g9iuw4Qs0EPoF6kR 30Uzu5sYrpZ5EJaIEbTzzPs+sv3O/AIj3mw93cWS2UYAc2BipGFZ6m/urwEagXBv8Gn9rplZq7KOv CUasrVoPjuu20TL2YfBWQA==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYhrS-0005Gu-SA; Sun, 05 Mar 2023 01:28:47 -0500 Date: Sun, 05 Mar 2023 08:28:36 +0200 Message-Id: <83zg8r90ff.fsf@gnu.org> From: Eli Zaretskii To: rms@gnu.org In-Reply-To: (message from Richard Stallman on Sat, 04 Mar 2023 23:03:57 -0500) Subject: Re: bug#61880: Native compilation fails to generate trampolines on certain scenarios References: <877cw1l455.fsf@sergiodj.net> <83sfeofyi6.fsf@gnu.org> <87edq8hxom.fsf@sergiodj.net> <83v8jjeiq0.fsf@gnu.org> <875ybiemkm.fsf@sergiodj.net> <83mt4ucnsz.fsf@gnu.org> <831qm6cbpr.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61880 Cc: sergiodj@sergiodj.net, 61880@debbugs.gnu.org, akrl@sdf.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 (---) > From: Richard Stallman > Cc: akrl@sdf.org, sergiodj@sergiodj.net, 61880@debbugs.gnu.org > Date: Sat, 04 Mar 2023 23:03:57 -0500 > > > > To a quick look into the trampoline machinery in comp.el I see we rely > > > on: > > > > > > null, memq, gethash, and, subrp, not, subr-native-elisp-p, > > > comp--install-trampoline, concat, if, symbolp, symbol-name, make-string, > > > length, aset, aref, length>, mapcar, expand-file-name, > > > file-name-as-directory, file-exists-p, native-elisp-load. > > There is nothing wrong with ignoring the return value of `aset'. That > is normal. We use it like `setq'. Do not make warnings for that. This is a misunderstanding, I think: this particular discussion is not about ignoring the return values, it is about redefining primitives while natively-compiling trampolines. I think you mixed this up with another discussion. From debbugs-submit-bounces@debbugs.gnu.org Sun Mar 05 05:44:55 2023 Received: (at 61880) by debbugs.gnu.org; 5 Mar 2023 10:44:55 +0000 Received: from localhost ([127.0.0.1]:38571 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYlrL-0001y7-Br for submit@debbugs.gnu.org; Sun, 05 Mar 2023 05:44:55 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42778) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pYlrJ-0001xt-0f for 61880@debbugs.gnu.org; Sun, 05 Mar 2023 05:44:54 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYlr6-0005SK-0c; Sun, 05 Mar 2023 05:44:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=7HHW6My3M32Qowg3j0rbugbeo7jpA/MpPizJF0cRaFE=; b=Df34RtV1YKjs KnScGvWeyC1I5edRzYJuoR5dGkJWiUlZsnPb6Kq/KMXcH8Y4ij+OSU2mpOW0D1AXAVSNXbBS8yKpu S2XeB/0LyXEYBGyAPoCcrByZMgPRCyI1dK8LkbOVUUQGkD+2A1CQlG/D4NyvfougKf8nJButoXpIN KUHqKPox0311XM+ZtWumw8VlrZmPG27CNBj3zSULy+EbW+yWWC0Iqn7Dwxnrro616xKLrTD/Hm6Jl +3k3tHOmM3zONv2Z44SCPHLAMH/yUTbTE+Ro6L9eu6C3S6FLCWSHBqAEhbqAeMW+aKu6SXGCq/BJQ VVpa2kvrtR85TZ30TraqdQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYlr5-0007dz-BZ; Sun, 05 Mar 2023 05:44:39 -0500 Date: Sun, 05 Mar 2023 12:44:29 +0200 Message-Id: <83pm9n8oky.fsf@gnu.org> From: Eli Zaretskii To: Andrea Corallo In-Reply-To: (message from Andrea Corallo on Sun, 05 Mar 2023 10:08:12 +0000) Subject: Re: bug#61880: Native compilation fails to generate trampolines on certain scenarios References: <877cw1l455.fsf@sergiodj.net> <83sfeofyi6.fsf@gnu.org> <87edq8hxom.fsf@sergiodj.net> <83v8jjeiq0.fsf@gnu.org> <875ybiemkm.fsf@sergiodj.net> <83mt4ucnsz.fsf@gnu.org> <831qm6cbpr.fsf@gnu.org> <83bkl9arvo.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61880 Cc: sergiodj@sergiodj.net, 61880@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 (---) > From: Andrea Corallo > Cc: sergiodj@sergiodj.net, 61880@debbugs.gnu.org > Date: Sun, 05 Mar 2023 10:08:12 +0000 > > Okay I pushed 9c18af0cfaf with a slightly reworded warning to address > this, feel free to improve it if you fee. Thanks. I've changed the wording slightly. From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 09 04:49:56 2023 Received: (at 61880) by debbugs.gnu.org; 9 Mar 2023 09:49:56 +0000 Received: from localhost ([127.0.0.1]:50924 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paCuJ-0007QN-UN for submit@debbugs.gnu.org; Thu, 09 Mar 2023 04:49:56 -0500 Received: from eggs.gnu.org ([209.51.188.92]:49636) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paCuI-0007Q8-6k for 61880@debbugs.gnu.org; Thu, 09 Mar 2023 04:49:54 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1paCuC-0002J7-Al; Thu, 09 Mar 2023 04:49:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=3A7wSDNwLg5hfqvzWUvqhRKVWeYHWqfIcofFx9sBUYY=; b=UMkjrdFxt/vU yi9EfcdZLAN9owFIL9bjlbNiVRNejFbVK/HaY1en2NTqqe/8uWFkx/lO8KXklMrNr16g+uMI7cxTb HcxPq2ce5i1UlPTqfmJOHowUysZDbu2KJ+c/TPrH0XedUiLFaPeOFmchAc3zN0Tk9QtkOPfyEOIS4 zYA35g+HLXYdW17JZ7joQmGmx9zSlTqj+qNFdzqVmYmEjSNd7hZQPtdeUgFSyXpQIm1AHtOI2uefz SVMwgqcrQLSrNrMlJ8RuU6KFs3P2Y/CTPxd1PZWE92n7I3UblhDXl+b+NN7eXsmtS3pWQLYdMyuAf Wcq1KxI+uOFYojCMuivp0A==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1paCuB-0001c3-WE; Thu, 09 Mar 2023 04:49:48 -0500 Date: Thu, 09 Mar 2023 11:49:49 +0200 Message-Id: <83cz5i2r0i.fsf@gnu.org> From: Eli Zaretskii To: akrl@sdf.org, sergiodj@sergiodj.net In-Reply-To: <83pm9n8oky.fsf@gnu.org> (message from Eli Zaretskii on Sun, 05 Mar 2023 12:44:29 +0200) Subject: Re: bug#61880: Native compilation fails to generate trampolines on certain scenarios References: <877cw1l455.fsf@sergiodj.net> <83sfeofyi6.fsf@gnu.org> <87edq8hxom.fsf@sergiodj.net> <83v8jjeiq0.fsf@gnu.org> <875ybiemkm.fsf@sergiodj.net> <83mt4ucnsz.fsf@gnu.org> <831qm6cbpr.fsf@gnu.org> <83bkl9arvo.fsf@gnu.org> <83pm9n8oky.fsf@gnu.org> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61880 Cc: 61880@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 (---) > Cc: sergiodj@sergiodj.net, 61880@debbugs.gnu.org > Date: Sun, 05 Mar 2023 12:44:29 +0200 > From: Eli Zaretskii > > > From: Andrea Corallo > > Cc: sergiodj@sergiodj.net, 61880@debbugs.gnu.org > > Date: Sun, 05 Mar 2023 10:08:12 +0000 > > > > Okay I pushed 9c18af0cfaf with a slightly reworded warning to address > > this, feel free to improve it if you fee. > > Thanks. I've changed the wording slightly. Is there anything else to do for this issue, or should we now close it? From debbugs-submit-bounces@debbugs.gnu.org Thu Mar 09 06:36:40 2023 Received: (at 61880-done) by debbugs.gnu.org; 9 Mar 2023 11:36:40 +0000 Received: from localhost ([127.0.0.1]:51063 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paEZc-0001yO-6L for submit@debbugs.gnu.org; Thu, 09 Mar 2023 06:36:40 -0500 Received: from ma.sdf.org ([205.166.94.33]:45186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paEZX-0001xv-Ht for 61880-done@debbugs.gnu.org; Thu, 09 Mar 2023 06:36:39 -0500 Received: from akrl by ma.sdf.org with local (Exim 4.92) (envelope-from ) id 1paEZV-0003ri-Jm; Thu, 09 Mar 2023 11:36:33 +0000 From: Andrea Corallo To: Eli Zaretskii Subject: Re: bug#61880: Native compilation fails to generate trampolines on certain scenarios In-Reply-To: <83cz5i2r0i.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 09 Mar 2023 11:49:49 +0200") References: <877cw1l455.fsf@sergiodj.net> <83sfeofyi6.fsf@gnu.org> <87edq8hxom.fsf@sergiodj.net> <83v8jjeiq0.fsf@gnu.org> <875ybiemkm.fsf@sergiodj.net> <83mt4ucnsz.fsf@gnu.org> <831qm6cbpr.fsf@gnu.org> <83bkl9arvo.fsf@gnu.org> <83pm9n8oky.fsf@gnu.org> <83cz5i2r0i.fsf@gnu.org> Date: Thu, 09 Mar 2023 11:36:33 +0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.7 (/) X-Debbugs-Envelope-To: 61880-done Cc: sergiodj@sergiodj.net, 61880-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: -0.3 (/) Eli Zaretskii writes: >> Cc: sergiodj@sergiodj.net, 61880@debbugs.gnu.org >> Date: Sun, 05 Mar 2023 12:44:29 +0200 >> From: Eli Zaretskii >> >> > From: Andrea Corallo >> > Cc: sergiodj@sergiodj.net, 61880@debbugs.gnu.org >> > Date: Sun, 05 Mar 2023 10:08:12 +0000 >> > >> > Okay I pushed 9c18af0cfaf with a slightly reworded warning to address >> > this, feel free to improve it if you fee. >> >> Thanks. I've changed the wording slightly. > > Is there anything else to do for this issue, or should we now close > it? Not that I'm aware. I'm closing it now, happy to reopen if something more pops-up. Best Regards Andrea From debbugs-submit-bounces@debbugs.gnu.org Fri Mar 10 23:36:00 2023 Received: (at 61880) by debbugs.gnu.org; 11 Mar 2023 04:36:00 +0000 Received: from localhost ([127.0.0.1]:56394 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paqxc-0008B8-BW for submit@debbugs.gnu.org; Fri, 10 Mar 2023 23:36:00 -0500 Received: from mail.sergiodj.net ([167.114.15.217]:47478) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1paqxb-0008Av-Ak for 61880@debbugs.gnu.org; Fri, 10 Mar 2023 23:35:59 -0500 Received: from localhost (unknown [IPv6:2607:f2c0:ed84:d00:624d:dd5e:7d36:ca89]) by mail.sergiodj.net (Postfix) with ESMTPSA id DD4DAA008D; Fri, 10 Mar 2023 23:35:53 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=sergiodj.net; s=20160602; t=1678509353; bh=9dqBy8z22vcGWRVVe5DLSY3emKJg3LF0FLpIFhHg17w=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=J0ufRuetCsRcgiuEH0Yo3rpF4fJCWTFkqSO9g+9muMX/zytTkOE5qcVbWFIYFtpxJ fW3DZtOPddOuywa5YGXtIuY6KOjIrRLM6aHmHUGnW9pNoDwobe/5r7iep7YPmUkiN8 20JsIp5SJWEZ5zRrK6yte/Iaq8uH95vjiLv56Ilw= From: Sergio Durigan Junior To: Andrea Corallo Subject: Re: bug#61880: Native compilation fails to generate trampolines on certain scenarios In-Reply-To: (Andrea Corallo's message of "Thu, 09 Mar 2023 11:36:33 +0000") References: <877cw1l455.fsf@sergiodj.net> <83sfeofyi6.fsf@gnu.org> <87edq8hxom.fsf@sergiodj.net> <83v8jjeiq0.fsf@gnu.org> <875ybiemkm.fsf@sergiodj.net> <83mt4ucnsz.fsf@gnu.org> <831qm6cbpr.fsf@gnu.org> <83bkl9arvo.fsf@gnu.org> <83pm9n8oky.fsf@gnu.org> <83cz5i2r0i.fsf@gnu.org> X-URL: http://blog.sergiodj.net Date: Fri, 10 Mar 2023 23:35:53 -0500 Message-ID: <87r0tv6h1y.fsf@sergiodj.net> 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: 61880 Cc: Eli Zaretskii , 61880@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 Thursday, March 09 2023, Andrea Corallo wrote: > Eli Zaretskii writes: > >>> Cc: sergiodj@sergiodj.net, 61880@debbugs.gnu.org >>> Date: Sun, 05 Mar 2023 12:44:29 +0200 >>> From: Eli Zaretskii >>> >>> > From: Andrea Corallo >>> > Cc: sergiodj@sergiodj.net, 61880@debbugs.gnu.org >>> > Date: Sun, 05 Mar 2023 10:08:12 +0000 >>> > >>> > Okay I pushed 9c18af0cfaf with a slightly reworded warning to address >>> > this, feel free to improve it if you fee. >>> >>> Thanks. I've changed the wording slightly. >> >> Is there anything else to do for this issue, or should we now close >> it? > > Not that I'm aware. > > I'm closing it now, happy to reopen if something more pops-up. Thank you both for working on a proper fix for this problem. -- Sergio GPG key ID: 237A 54B1 0287 28BF 00EF 31F4 D0EB 7628 65FC 5E36 Please send encrypted e-mail if possible https://sergiodj.net/ From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 11 10:10:10 2023 Received: (at 61880) by debbugs.gnu.org; 11 Mar 2023 15:10:10 +0000 Received: from localhost ([127.0.0.1]:58481 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pb0rJ-0007tz-QE for submit@debbugs.gnu.org; Sat, 11 Mar 2023 10:10:09 -0500 Received: from mail-wm1-f53.google.com ([209.85.128.53]:56297) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pb0rI-0007te-2E for 61880@debbugs.gnu.org; Sat, 11 Mar 2023 10:10:08 -0500 Received: by mail-wm1-f53.google.com with SMTP id p16so5220999wmq.5 for <61880@debbugs.gnu.org>; Sat, 11 Mar 2023 07:10:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678547402; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=sIfBYyYVZmZP6P6HYYQnt33rioxgMkrAkqizVtx1h6E=; b=NikcmecFlT+PdoQakcXLqWX9B5P9V5MJhlB3ceSDQMOGjh7ybH/xU0RV9pZqhvqkN7 xyTNEvpxZMMXbe3ladhi7XPJjhOu3eJZ/BjuhKJVNt286d7GjIa8cvUJm75pP6QQT04w KaYUDw9F7Ui51LbmdEdH58+MThAvWGO3fHZS2bn6EgFU6rrMWM1mr7zQkQHRm+fmt1XC 0AP9rK5iMlnji34UYO/W0reF/W4A1GOXcJkGiWDa0YnPsLt/QMDrer2Bj0h4HE9gNcp5 LImVgi1RyQpBeGUeW9pCVge5r+Zluy/V33DE6ez/P0v8V6jK+nSHw2J6J8a040B3FIuA Ld0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678547402; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=sIfBYyYVZmZP6P6HYYQnt33rioxgMkrAkqizVtx1h6E=; b=jFov7pgGXF23i/JJIXkPEkynH04KOgaxvj/urkXLwHqODABFGPWu1ZiYb+DM9g5uZW lHSbc8fJffqFdi7zEr3gfVqGzoNrrn6YXJrMzfpFabQLzYQ48XagQWngxEufQ2l90Ltb zoDvsJKEnk+t7CPH7L1LlRBTbNzoAes3Qh3xjHt1Jk/3AbZvjn9ZTALFzvaZW6Uxm/K9 iW8lL/fCJnstkYTiqHM6MvPYi9PdaSv5u41KyN/HbRGgsKs6T1qct7YBjMfxEeIQP20G d34ieCxzwGT9XPuRvt7oWqTWhWK2ZMJ+g1NiHGJBr8/i9YtgcOaRo8yarqWHiZ8lelp1 zmxg== X-Gm-Message-State: AO0yUKUxE/yFDr4JGFEeZc+KYIh5hzPZeiy91sqKwVcmquvbYsdeWSXs QBFjejg+xm3KmClA3+vL5Dg= X-Google-Smtp-Source: AK7set+dlCY0HJ6vAmMdeFlvCyavZNlwq+QWajHhBaDhUVqI7DlLnm7TboLpu+SfVoDMj8G8z56zTw== X-Received: by 2002:a05:600c:4f01:b0:3ea:f6c4:3060 with SMTP id l1-20020a05600c4f0100b003eaf6c43060mr5832362wmq.18.1678547402059; Sat, 11 Mar 2023 07:10:02 -0800 (PST) Received: from localhost (sgyl-45-b2-v4wan-165314-cust948.vm6.cable.virginm.net. [92.236.87.181]) by smtp.gmail.com with ESMTPSA id o4-20020a05600c378400b003e215a796fasm3003381wmr.34.2023.03.11.07.10.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Mar 2023 07:10:01 -0800 (PST) From: Al Haji-Ali To: Eli Zaretskii , Andrea Corallo Subject: bug#61880: Native compilation fails to generate trampolines on certain scenarios In-Reply-To: xjfo7p2tav2.fsf@ma.sdf.org Date: Sat, 11 Mar 2023 15:06:03 +0000 Message-ID: <87ilf79vl0.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61880 Cc: 61880@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 (-) Just a question and an FYI. It seems that even advising primitives issues the same warning now (advice-add 'concat :before #'ignore) Is this intentional? -- Al From debbugs-submit-bounces@debbugs.gnu.org Sat Mar 11 10:34:41 2023 Received: (at 61880) by debbugs.gnu.org; 11 Mar 2023 15:34:41 +0000 Received: from localhost ([127.0.0.1]:58495 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pb1F3-0008VX-IB for submit@debbugs.gnu.org; Sat, 11 Mar 2023 10:34:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47216) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pb1F1-0008VK-6N for 61880@debbugs.gnu.org; Sat, 11 Mar 2023 10:34:39 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pb1Ev-0002wT-OY; Sat, 11 Mar 2023 10:34:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=VMLbpGFP0d7qYdur6FMZclAqajltaqEz5BZ7Mg1WL3Y=; b=cQ2nDnvcDZE8 YPZPSlrj4JsUaOpYgpxh7vqe0iX7loKvAgNY8px0XcsjVvyj1gDvtuD0GR/QoXOm7+8gsGzf289nl inBFp6oZmJTX8oRYylZKvrMTxf5Layd+HElZk5vPNY0VE8yzNyB7s8Pw3tVChv3eDPOH8GWh1IhhM tw9NHKfW26M2hYxbrMTSY+0eHCbfOwb35zMMFTFlgC+aBIz3ya2rb8zxwC9HSerdWs009e6viG0wf iOmKG0UQ0+Tpqx50I48vZ1U3k8mJR88CImeF9ZGY10fYTYbKJsXconeJJL1+momwMQ+DgFJiTSRa+ kaJZxcGFfR3k7T7BdUWaVQ==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pb1Eu-00063V-Ih; Sat, 11 Mar 2023 10:34:33 -0500 Date: Sat, 11 Mar 2023 17:34:17 +0200 Message-Id: <83356bwbd2.fsf@gnu.org> From: Eli Zaretskii To: Al Haji-Ali In-Reply-To: <87ilf79vl0.fsf@gmail.com> (message from Al Haji-Ali on Sat, 11 Mar 2023 15:06:03 +0000) Subject: Re: bug#61880: Native compilation fails to generate trampolines on certain scenarios References: <87ilf79vl0.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61880 Cc: 61880@debbugs.gnu.org, akrl@sdf.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 (---) > From: Al Haji-Ali > Cc: 61880@debbugs.gnu.org > Date: Sat, 11 Mar 2023 15:06:03 +0000 > > > Just a question and an FYI. It seems that even advising primitives issues the same warning now > > (advice-add 'concat :before #'ignore) > > Is this intentional? Yes, because advising primitives which are involved in producing primitives could produce unpredictable results. From debbugs-submit-bounces@debbugs.gnu.org Mon Mar 13 23:58:53 2023 Received: (at 61880) by debbugs.gnu.org; 14 Mar 2023 03:58:53 +0000 Received: from localhost ([127.0.0.1]:35973 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pbvoK-0002zZ-OQ for submit@debbugs.gnu.org; Mon, 13 Mar 2023 23:58:53 -0400 Received: from eggs.gnu.org ([209.51.188.92]:45426) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pbvoJ-0002zJ-BP for 61880@debbugs.gnu.org; Mon, 13 Mar 2023 23:58:51 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pbvoD-0007to-MN; Mon, 13 Mar 2023 23:58:45 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=O9Lqbs3RgdaH8lGPH8SVLMdZiAW5uHK4YxIQGkuVSRQ=; b=G+i6iUnM31++ maIl8MpMalSjzdGCd68iB3CxkcUj69FkUIRKT1VXdpK1qhNCkQqUTXp9VpxBgFWuRT7vIkOQpXYIS kPz+tx60TQ8ZlUy/xSo9hNOptvRpxqJS/FVKjkJjre2NMgfFndJDoMNG6ofkWMM+vVdSbqV6X1qYn awnVaAO8BbaaqijNbkfRFtVYvf3RY12EkJT5FRHmAr9Y6xJ/InT9HTw1Kd/h5jkS1ODJ1dIcHBKlV wyBZCDY1F7yH0Nhw0zM6GUEg61y+nntmhNkBQIwPcMGn3TZpv2vkfYGCMc1avlwklDS7AbBzDzC7P UxzO6DV3GTQN2747rY0xLw==; Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1pbvoD-00056i-3b; Mon, 13 Mar 2023 23:58:45 -0400 Content-Type: text/plain; charset=Utf-8 From: Richard Stallman To: Eli Zaretskii In-Reply-To: <83356bwbd2.fsf@gnu.org> (message from Eli Zaretskii on Sat, 11 Mar 2023 17:34:17 +0200) Subject: Re: bug#61880: Native compilation fails to generate trampolines on certain scenarios References: <87ilf79vl0.fsf@gmail.com> <83356bwbd2.fsf@gnu.org> Message-Id: Date: Mon, 13 Mar 2023 23:58:45 -0400 X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61880 Cc: abdo.haji.ali@gmail.com, 61880@debbugs.gnu.org, akrl@sdf.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: , Reply-To: rms@gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > > Just a question and an FYI. It seems that even advising primitives issues the same warning now > > > > (advice-add 'concat :before #'ignore) > > > > Is this intentional? > Yes, because advising primitives which are involved in producing > primitives could produce unpredictable results. I'm very glad that we now warn users about this pitfall. We have had bug reports over the years from users who fell into it. To "fix" it would be a mistake, but a warning is fine. Maybe the text of the warning should be specific in the case of primitives like this. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org) From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 14 09:35:38 2023 Received: (at 61880) by debbugs.gnu.org; 14 Mar 2023 13:35:38 +0000 Received: from localhost ([127.0.0.1]:36670 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pc4oU-0004H8-5j for submit@debbugs.gnu.org; Tue, 14 Mar 2023 09:35:38 -0400 Received: from mail-lj1-f175.google.com ([209.85.208.175]:45707) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pc4oS-0004Gt-TS for 61880@debbugs.gnu.org; Tue, 14 Mar 2023 09:35:37 -0400 Received: by mail-lj1-f175.google.com with SMTP id h3so16024249lja.12 for <61880@debbugs.gnu.org>; Tue, 14 Mar 2023 06:35:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1678800931; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=c/pCz2f/SPSUntEfQR6yfwiBlCxo2LMGpm7e0ItDgK0=; b=XJmOuU7tnc7oTgcUzqmMC+EZ3RVKu044VGMwx+BOK9C4YkPGC5Nd6XaA3+3uHcQJvE i4Xy9E9bzULXPY9HKJQT1N0ezgkV/PrviEX8g5DkKvXcje4OnMu8iTKW67xMn8xSo44l HFwTpDD6WQ4+sy4ArMw2K4lHP+MgVRrLyqj2mM/ky9MGhnGgih+JuKdb6tUxokYx4T3V H+Mh37uIyOUBAbekUrMxLfzcY8eXwF5VTpeQSuEWLns70W00XnCatEXYhuAMByx59rmK nkl49FQ1/T3RV8mZf14lc7de1QWgrRYq21WRsB9tjZ7t+0RMUL53kJEKgBvm57i3FpEc PKEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678800931; h=mime-version: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=c/pCz2f/SPSUntEfQR6yfwiBlCxo2LMGpm7e0ItDgK0=; b=zI0kzb7VtraB1kNVqtUEyQQj2vyTHNm/efBJFsbWOmA86Jjm2YbB2ITC8qdbK2dCtx dNKTLKRvF9BkEsCZmD25RM/qRjYo9jIBvfI4EXdmKflBolhceBwvXkjdz4HyRpyuMUS4 aEaTn3jiuOqh0KDRH0OXzH1JEVzHPHZw4m/Fq017bl5urYlATJFtc4qYWZyxdDgMcHM1 gKctQ6sshiXwaG3BjPz16gLK60+mkU+pXb81TOHe4u60668MyYELCxolb8z40X3Ouu7A 5R0HudHGrKshknpiraJvtLjcbEcJnfWYH6ddqxLhhEb0JmNHSfdT+BShFQxAcV+lhbL8 hFJg== X-Gm-Message-State: AO0yUKVmkPaAyHZNJgTTRyoEkhQcnzkkgGDGkkC1izwFGOqIeXkbb9VM 6r5NwcK2Lx/4NwRCxLaVbgOYHlwr4to= X-Google-Smtp-Source: AK7set9sKAmYntolE8EKw2tyuDXrKbIPsrsA3ggszqTFNEu1E67MYcmB2+omn3WWQuKedlysJOnsLw== X-Received: by 2002:a5d:4211:0:b0:2ce:ade4:9493 with SMTP id n17-20020a5d4211000000b002ceade49493mr5474522wrq.9.1678800602071; Tue, 14 Mar 2023 06:30:02 -0700 (PDT) Received: from localhost (sgyl-45-b2-v4wan-165314-cust948.vm6.cable.virginm.net. [92.236.87.181]) by smtp.gmail.com with ESMTPSA id d16-20020a5d5390000000b002cea392f000sm2076495wrv.69.2023.03.14.06.30.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Mar 2023 06:30:01 -0700 (PDT) From: Al Haji-Ali To: rms@gnu.org, Eli Zaretskii Subject: Re: bug#61880: Native compilation fails to generate trampolines on certain scenarios In-Reply-To: References: <87ilf79vl0.fsf@gmail.com> <83356bwbd2.fsf@gnu.org> Date: Tue, 14 Mar 2023 13:22:13 +0000 Message-ID: <875yb3wjqy.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 61880 Cc: 61880@debbugs.gnu.org, akrl@sdf.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 13/03/2023, Richard Stallman wrote: > I'm very glad that we now warn users about this pitfall. > We have had bug reports over the years from users who fell > into it. To "fix" it would be a mistake, but a warning > is fine. Connecting this to bug#61917, is the compilation error there perhaps caused by the advice to the primitive function `delete-region`? Is it always wrong to advice primitives? Or only those that are "involved in producing primitives" as Eli put it? If so, how can one tell which is which? -- Al From debbugs-submit-bounces@debbugs.gnu.org Tue Mar 14 12:14:17 2023 Received: (at 61880) by debbugs.gnu.org; 14 Mar 2023 16:14:18 +0000 Received: from localhost ([127.0.0.1]:38319 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pc7I1-0000pW-Kk for submit@debbugs.gnu.org; Tue, 14 Mar 2023 12:14:17 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49252) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pc7Hy-0000pF-KG for 61880@debbugs.gnu.org; Tue, 14 Mar 2023 12:14:15 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pc7Hs-0005AF-Ij; Tue, 14 Mar 2023 12:14:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=I85JBF0UX8oOVlSSBMRYfnlypW5gVXgtrCDa2e+mtnY=; b=mAQDo1yCo9Rl bZl7ta1cxJq6DRCqe6pzbL5yeyK+FKyIsfuQBh8+cNSVdisx60Qf83w7/XuBREjQ3TlCnK79KftDs NFCAs3bqM5VP626mi73YsNHCD+Ai8tEv0DoHXfwP7jEax0RTjW61IxuxuRccMAd6fNpooPImON8RU 8uAggXhBsRtx1PUtX/CBXfPxtJfK/8BUwXuJdBls5QQbG6Z3CeHsRUmVFlFj99eKj7kHufCo4KeMw aIfKAdJZQXfhiFMTHWA+TzR6RNdjx4eRzgJ2p9gsbh441SLiwNmyQluXySoq06iYfXACVfmcQFMn7 7P4iN0eEVtpC7wFcxWHcpg==; Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pc7Hm-0008PO-8O; Tue, 14 Mar 2023 12:14:02 -0400 Date: Tue, 14 Mar 2023 18:13:55 +0200 Message-Id: <83h6uns43g.fsf@gnu.org> From: Eli Zaretskii To: Al Haji-Ali In-Reply-To: <875yb3wjqy.fsf@gmail.com> (message from Al Haji-Ali on Tue, 14 Mar 2023 13:22:13 +0000) Subject: Re: bug#61880: Native compilation fails to generate trampolines on certain scenarios References: <87ilf79vl0.fsf@gmail.com> <83356bwbd2.fsf@gnu.org> <875yb3wjqy.fsf@gmail.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 61880 Cc: rms@gnu.org, 61880@debbugs.gnu.org, akrl@sdf.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 (---) > From: Al Haji-Ali > Cc: 61880@debbugs.gnu.org, akrl@sdf.org > Date: Tue, 14 Mar 2023 13:22:13 +0000 > > > On 13/03/2023, Richard Stallman wrote: > > I'm very glad that we now warn users about this pitfall. > > We have had bug reports over the years from users who fell > > into it. To "fix" it would be a mistake, but a warning > > is fine. > > Connecting this to bug#61917, is the compilation error there perhaps caused by the advice to the primitive function `delete-region`? > > Is it always wrong to advice primitives? Not wrong, but risky. Especially if the advice basically subverts the primitive, like makes it always fail or something -- this is frequently done in various mocking frameworks for testing purposes. > Or only those that are "involved in producing primitives" as Eli put it? Only those, yes. And only in a way that significantly changes what the original primitives do. > If so, how can one tell which is which? The warning knows. It only warns against those we know could be harmful. From unknown Sat Jun 14 18:58:20 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Wed, 12 Apr 2023 11:24:08 +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