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.devel Subject: Re: Updating *.el files and native compilation Date: Mon, 10 May 2021 16:34:43 +0300 Message-ID: <837dk67lvw.fsf@gnu.org> References: <83mtt5acjw.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="21336"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon May 10 15:40:11 2021 Return-path: Envelope-to: ged-emacs-devel@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 1lg68l-00055I-4N for ged-emacs-devel@m.gmane-mx.org; Mon, 10 May 2021 15:40:07 +0200 Original-Received: from localhost ([::1]:47832 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lg68k-0005Wr-2R for ged-emacs-devel@m.gmane-mx.org; Mon, 10 May 2021 09:40:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:52830) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lg63V-0001z7-Ql for emacs-devel@gnu.org; Mon, 10 May 2021 09:34:41 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:39522) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lg63U-0001vZ-C7; Mon, 10 May 2021 09:34:40 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:3367 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 1lg63T-0003w0-Af; Mon, 10 May 2021 09:34:40 -0400 In-Reply-To: (message from Andrea Corallo on Mon, 10 May 2021 07:35:53 +0000) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:269114 Archived-At: > From: Andrea Corallo > Cc: emacs-devel@gnu.org > Date: Mon, 10 May 2021 07:35:53 +0000 > > > . if, for some reason, Emacs loads an incompatible .eln file, then > > some Lisp programs could crash the Emacs session, is that correct? > > If so, how do we make sure such incompatible changes always cause > > a new native compilation that yields a different file name for the > > .eln file? > > Yes but this should not happen, every change that can introduce an > incompatibility has to be accounted in the `comp-abi-hash' computation > and AFAIK ATM it is. Some changes don't require updating comp-abi-hash, but still create *.eln files with different hashes in its name. AFAIU, that happens when the primitives don't change, but the .el file itself changes, isn't that so? In any case, are you saying that the only situations where loading and using a .eln file could crash Emacs are those which are handled by changing comp-abi-hash? If so, how can we make sure we never fail to update comp-abi-hash when that is needed? > > The upshot of all this is that if one keeps multiple Emacs > > executables, it should be safe to invoke each one of them without > > risking crashes due to loading incompatible *.eln files that were > > produced by other, subtly incompatible Emacs executables. Is this > > indeed safe, or do we have some "gotchas" that still need to be taken > > care of? > > As of today I'm not aware of any gotcha here, if we discover a case of > this we should treat it as bug. Sure.