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: Sat, 04 Mar 2023 09:38:03 +0200 Message-ID: <83bkl9arvo.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> <831qm6cbpr.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="25034"; 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 Sat Mar 04 08:39:22 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 1pYMUE-0006Mi-4a for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 04 Mar 2023 08:39:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pYMTy-0006BY-Pa; Sat, 04 Mar 2023 02:39: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 1pYMTu-0006BA-Fj for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2023 02:39: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 1pYMTu-00012n-7Y for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2023 02:39:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pYMTu-0000Uc-0J for bug-gnu-emacs@gnu.org; Sat, 04 Mar 2023 02:39: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: Sat, 04 Mar 2023 07:39:01 +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.16779155041840 (code B ref 61880); Sat, 04 Mar 2023 07:39:01 +0000 Original-Received: (at 61880) by debbugs.gnu.org; 4 Mar 2023 07:38:24 +0000 Original-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 Original-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 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 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==; 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 1pYMT9-0005C2-4f; Sat, 04 Mar 2023 02:38:15 -0500 In-Reply-To: (message from Andrea Corallo on Sat, 04 Mar 2023 00:20:41 +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:257256 Archived-At: > 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?