From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#61880: Native compilation fails to generate trampolines on certain scenarios Date: Fri, 03 Mar 2023 13:32:00 +0200 Message-ID: <831qm6cbpr.fsf@gnu.org> 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> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="620"; mail-complaints-to="usenet@ciao.gmane.io" Cc: sergiodj@sergiodj.net, 61880@debbugs.gnu.org To: Andrea Corallo Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 03 12:33:26 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pY3fC-000AWJ-7P for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 03 Mar 2023 12:33:26 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pY3eq-0001Op-Ab; Fri, 03 Mar 2023 06:33:04 -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 1pY3eo-0001OX-Pd for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2023 06:33:02 -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 1pY3eo-00082e-HZ for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2023 06:33:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pY3eo-0002iJ-1e for bug-gnu-emacs@gnu.org; Fri, 03 Mar 2023 06:33:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Mar 2023 11:33: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.167784314610386 (code B ref 61880); Fri, 03 Mar 2023 11:33:02 +0000 Original-Received: (at 61880) by debbugs.gnu.org; 3 Mar 2023 11:32:26 +0000 Original-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 Original-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 Original-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==; Original-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 In-Reply-To: (message from Andrea Corallo on Fri, 03 Mar 2023 10:05:21 +0000) 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:257207 Archived-At: > 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.