From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet via "Emacs development discussions." Newsgroups: gmane.emacs.devel Subject: Re: Merging scratch/no-purespace to remove unexec and purespace Date: Wed, 18 Dec 2024 16:05:59 +0000 Message-ID: <87jzbx9du1.fsf@protonmail.com> References: <86seqmm9dq.fsf@gnu.org> Reply-To: Pip Cet Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7307"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Andrea Corallo , Eli Zaretskii , stefankangas@gmail.com, emacs-devel@gnu.org, monnier@iro.umontreal.ca To: =?utf-8?Q?Gerd_M=C3=B6llmann?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Dec 18 17:27:29 2024 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 1tNwtT-0001hA-S0 for ged-emacs-devel@m.gmane-mx.org; Wed, 18 Dec 2024 17:27:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tNwpf-0002yR-AN; Wed, 18 Dec 2024 11:23:31 -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 1tNwYu-0004qd-QC for emacs-devel@gnu.org; Wed, 18 Dec 2024 11:06:14 -0500 Original-Received: from mail-40131.protonmail.ch ([185.70.40.131]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tNwYo-0000vb-Qg for emacs-devel@gnu.org; Wed, 18 Dec 2024 11:06:12 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1734537963; x=1734797163; bh=A/6jXSe5fHZjVPB+cIecqq04UUn4rfkpYmjwAYor7bo=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector:List-Unsubscribe:List-Unsubscribe-Post; b=Q7jeRNX+KDjYEQ9RMr3utB5kLQA1zcWyfhNWLRjhX9mynGipMndMTCCGj537NJbr3 U2AD/O4QCWoIPMS8KY3H2+1qEqsveDujWpXWpdT+IICrjrr5aIkHlLIIPJkJIzg70B LhQwt3mYy/B46MtZAjufKaOJPOaibXYIKUv6rel2bwGpCNXh4XlftWGeMYK6bCuwHW MpKlum/tSJmV6vBeQ70Qu/4cGypCMa3Keed0RQX2Gfaoez9LfQjH03lp38OtsAGdbh Cc7jy7Mk+n6OdmrJaNTANuu9qA/q+nc1JJSKCaQOjkU6SYKA6eCZ493V90GdqraMSW e1dLJFjRKKGug== In-Reply-To: Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 36219f6a7d10a512a4c69c2d70fda980bf41a1a2 Received-SPF: pass client-ip=185.70.40.131; envelope-from=pipcet@protonmail.com; helo=mail-40131.protonmail.ch X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 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, FREEMAIL_FROM=0.001, RCVD_IN_MSPIKE_H2=-1.116, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Wed, 18 Dec 2024 11:23:27 -0500 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:326662 Archived-At: Gerd M=C3=B6llmann writes: > Andrea Corallo writes: > >> Gerd M=C3=B6llmann writes: >> >>> Eli Zaretskii writes: >>> >>>>> From: Gerd M=C3=B6llmann >>>>> Cc: emacs-devel@gnu.org, Pip Cet , Stefan Mo= nnier >>>>> >>>>> Date: Tue, 17 Dec 2024 18:56:05 +0100 >>>>> >>>>> Gerd M=C3=B6llmann writes: >>>>> >>>>> > Gerd M=C3=B6llmann writes: >>>>> > >>>>> >> I think check_comp_unit_relocs should be removed in the branch. Wh= at's >>>>> >> left of it the branch, checks in master if everything has been >>>>> >> put in purespace which should be there. IIUC correctly, of course. >>>>> > >>>>> > Patch attached. >>>>> >>>>> Pushed. Complaints to me please. >>>> >>>> I'd like at least Andrea to take a look and confirm. >>> >>> It's 81fc23b5d6a60ca4f3d269ab2c88eb9a850bac4c >> >> Hi Gerd, >> >> looking at the commit now, why do you think 'check_comp_unit_relocs' >> should be removed? >> >> Even if now the situation is simpler 'check_comp_unit_relocs' is still >> performing some sanity checks like if lambdas are all been fixed-up and >> present in 'comp_u->lambda_gc_guard_h'. >> >> Andrea > > Hi Andrea. > > The check you mention checks something that I don't see how it could > happen. (With the usual disclaimers, because it's been some time since I > was in that code for igc.) I'm confused, I thought you did hit the assertion? AFAICT, the problem is simply that comp.el uses the symbol lambda-fixup. So a relocation for that symbol is emitted. But no fixup is, because this isn't an actual lambda, it's merely the symbol. The debug code then sees "lambda-fixup", assumes it's a failed fixup, and asserts. IOW, the old code happened not to run into this problem because lambda-fixup was pure, and we never applied the sanity checks to the pure section. This "fix" appears to work: diff --git a/lisp/emacs-lisp/comp.el b/lisp/emacs-lisp/comp.el index dbd14b2740d..5d364e77e66 100644 --- a/lisp/emacs-lisp/comp.el +++ b/lisp/emacs-lisp/comp.el @@ -3254,7 +3254,7 @@ comp--finalize-container ;; from the corresponding m-var. collect (if (gethash obj (comp-ctxt-byte-func-to-func-h comp-= ctxt)) - 'lambda-fixup + (intern (concat "lambda" (make-string 1 ?-) "= fixup")) obj)))) =20 (defun comp--finalize-relocs () My suggestion is to fix the "sanity check" on the master branch, change it to apply to pure relocs there, and restore the fixed check on scratch/no-purespace afterwards. Pip