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: Merging scratch/no-purespace to remove unexec and purespace Date: Sat, 04 Jan 2025 09:26:40 +0200 Message-ID: <86ldvrf39r.fsf@gnu.org> References: <87frml9cy4.fsf@protonmail.com> <875xng9g48.fsf@protonmail.com> <87ttaz98q1.fsf@protonmail.com> <87y10b77p7.fsf@protonmail.com> <87ikqvikzr.fsf@protonmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33082"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org, stefankangas@gmail.com, acorallo@gnu.org, gerd.moellmann@gmail.com, monnier@iro.umontreal.ca To: Pip Cet Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 04 08:27:31 2025 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 1tTyZH-0008RS-Af for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Jan 2025 08:27:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTyYh-0008DR-Qv; Sat, 04 Jan 2025 02:26:55 -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 1tTyYf-0008D4-Mv for emacs-devel@gnu.org; Sat, 04 Jan 2025 02:26:53 -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 1tTyYe-0008OS-F1; Sat, 04 Jan 2025 02:26:52 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=+yDdJbEwkjssTuoi5w314UH3Ic5/+Y7RiDuK5Byi1IY=; b=SVgaRBGY8VduOItn8fXY qlFCkwhJKvInSaCfJ6fR8CymT0t+f6CbQIOFHaGoQzs/SnKkSSNo/W/zvxqppjeSN/uY8w7Apo0cR XeoIpFJSIbcM9XlzqvE4+H6Q5pPGmvhU1WqeoGnqBC0jGMMf/HGrmA9CAJSKVPkXi8HHkAgsgtALl bK4osE7yAzeOOOcTQFfIwJ9XNuvGed0nXwENChWF7cY170aC8RzQfJmCbSST4XrZnCB/FfOwPnOY3 WiqGufT18vFNGDEI2E2b64LAdaqs6iHjny00/Ith6gY5cIbCM7UXn8ALeWXMMoX/VLLvvmNo6R5iV W9pnsxaGiACQfQ==; In-Reply-To: <87ikqvikzr.fsf@protonmail.com> (message from Pip Cet on Fri, 03 Jan 2025 22:36:42 +0000) 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:327653 Archived-At: > Date: Fri, 03 Jan 2025 22:36:42 +0000 > From: Pip Cet > Cc: Stefan Kangas , Andrea Corallo , Gerd Möllmann , Eli Zaretskii , monnier@iro.umontreal.ca > > "Pip Cet via \"Emacs development discussions.\"" writes: > > > "Stefan Kangas" writes: > > > >> Pip Cet writes: > >> > >>> "Stefan Kangas" writes: > >>> > >>>> Pip Cet writes: > >>>> > >>>>> What I think we should do doesn't really matter, but it seems quite > >>>>> obvious to me that we should make the code on the master branch > >>>>> perform all three checks on all relocations, as the code on > >>>>> no-purespace does. > >>>> > >>>> Maybe. But won't we get those checks with no additional effort once we > >>>> merge no-purespace, > >>> > >>> Yes, we will. (And the forbidden symbol; even if the forbidden symbol > >>> doesn't cause trouble, which I think it will, it's simply very poor > >>> programming practice to do things that way, particularly since the > >>> crash may happen a long time after the compilation. But, again, what I > >>> think obviously doesn't matter here. I'll just remember that > >>> --enable-checking causes false positive crashes and shouldn't be used). > >> > >> I don't think the existence of one symbol that will crash Emacs in some > >> situations means that --enable-checking should be completely avoided. > >> It's still quite useful, and we're fine as long as we avoid using that > >> one symbol, right? > >> > >> OTOH and IMHO, it would be preferable if that symbol could not crash > >> Emacs. Can we come up with a good way to fix that, while preserving the > >> check that Andrea wants to keep? > > > > That sounds like a good thing to focus on, yes. We need to have a value > > in a vector that we Fread that is distinguishable from all other values. > > I just reread the code, and #$ may be what we're looking for. It's a > unique value that we can pass in to Fread (let-binding load-file-name), > and it already exists. OTOH, it's used for docstrings normally, so it > may be cleaner to invent new read syntax. > > I'd really like to fix this. > > > For example, right now this code doesn't work: > > > > (let ((print-circle t) (read-circle nil)) > > (message "%S" (funcall (native-compile (lambda () #1=[#1#]))))) > > > > (read, of course, with read-circle bound to t) > > > > but this does: > > > > (let ((print-circle t) (read-circle nil)) > > (message "%S" (funcall (lambda () #1=[#1#])))) > > > > So this seems like a cheap drive-by fix. > > The non-nativecomp code also breaks if read-circle is nil (I assume this > is related to autoload), so it isn't just the nativecomp code that > should be fixed. Is this about bug#74966? If so, let's not discuss the same issue here. Andrea suggested a change that he prefers, and from where I stand, we should wait for him to publish such a patch. Then we can discuss the patch if there are comments or objections. But let's do all that in the bug thread, not here. Apologies if I misunderstood what the above is about.