From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Andrea Corallo Newsgroups: gmane.emacs.bugs Subject: bug#61880: Native compilation fails to generate trampolines on certain scenarios Date: Sat, 04 Mar 2023 00:20:41 +0000 Message-ID: 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> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9206"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) Cc: sergiodj@sergiodj.net, 61880@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Mar 04 01:21:16 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pYFeG-0002DJ-3l for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Mar 2023 01:21:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pYFe6-0007Ks-8F; Fri, 03 Mar 2023 19:21:06 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pYFe3-0007Ie-I7 for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2023 19:21:03 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pYFe2-00038Q-Sx for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2023 19:21:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pYFe2-0005eC-Eq for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2023 19:21:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Andrea Corallo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 04 Mar 2023 00:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 61880 X-GNU-PR-Package: emacs Original-Received: via spool by 61880-submit@debbugs.gnu.org id=B61880.167788924921667 (code B ref 61880); Sat, 04 Mar 2023 00:21:02 +0000 Original-Received: (at 61880) by debbugs.gnu.org; 4 Mar 2023 00:20:49 +0000 Original-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 Original-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 Original-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 In-Reply-To: <831qm6cbpr.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 03 Mar 2023 13:32:00 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:257243 Archived-At: 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