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: Sat, 04 Jan 2025 11:12:48 +0000 Message-ID: <875xmuj0k3.fsf@protonmail.com> References: <875xng9g48.fsf@protonmail.com> <87ttaz98q1.fsf@protonmail.com> <87y10b77p7.fsf@protonmail.com> <87ikqvikzr.fsf@protonmail.com> <86ldvrf39r.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="9077"; 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: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 04 14:28:23 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 1tU4CV-00020M-Dn for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Jan 2025 14:28:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tU4Bu-0000Xc-SV; Sat, 04 Jan 2025 08:27:46 -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 1tU25T-0005YO-8S for emacs-devel@gnu.org; Sat, 04 Jan 2025 06:12:59 -0500 Original-Received: from mail-10629.protonmail.ch ([79.135.106.29]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tU25R-00072d-47; Sat, 04 Jan 2025 06:12:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1735989173; x=1736248373; bh=WMPBZjSYBxyb7pZb2/P/kHejyKIQCvrFQ7WdDSjre4Q=; 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=BzK0hIY2kn+QBiKdEYogneQhK9oydErf3CUB77XgD6CKUoI2V2x37OUZyMg75ohXG Giw1/FsYo9fY4Ku5P80v8rs9ph+ByfzEpXIoovof2QWQf3j9lYuLUTj0ct5vbsWhW7 gBPGP1Ko/qVR3563jcdtnpS2Ta3miuOrOEa+MKsxJakaJxO2inrGOxCvMqbcBxy2ny e4c5nkH5EuerHkoD/Djq+v1PeGVVow5DUBHkUi7rdq45QwiX4bt+47wStZeFrXonjn yzvDNW4hHeBtr7at1VtWpoSYXuAGtGFbKAGPgPHSREs4r4resu/Qc9Cr6nhf56exor h4zENC6xmiIWw== In-Reply-To: <86ldvrf39r.fsf@gnu.org> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 428c97959caa13d794fbc2c63ca1f2c3d747da6d Received-SPF: pass client-ip=79.135.106.29; envelope-from=pipcet@protonmail.com; helo=mail-10629.protonmail.ch X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_DNSWL_NONE=-0.0001, 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: Sat, 04 Jan 2025 08:27:42 -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:327663 Archived-At: "Eli Zaretskii" writes: >> Date: Fri, 03 Jan 2025 22:36:42 +0000 >> From: Pip Cet >> Cc: Stefan Kangas , Andrea Corallo >> , Gerd M=C3=B6llmann , Eli >> Zaretskii , monnier@iro.umontreal.ca >> >> "Pip Cet via \"Emacs development discussions.\"" w= rites: >> >> > "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 quit= e >> >>>>> 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 onc= e we >> >>>> merge no-purespace, >> >>> >> >>> Yes, we will. (And the forbidden symbol; even if the forbidden symb= ol >> >>> 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, wha= t I >> >>> think obviously doesn't matter here. I'll just remember that >> >>> --enable-checking causes false positive crashes and shouldn't be use= d). >> >> >> >> I don't think the existence of one symbol that will crash Emacs in so= me >> >> situations means that --enable-checking should be completely avoided. >> >> It's still quite useful, and we're fine as long as we avoid using tha= t >> >> 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 val= ue >> > in a vector that we Fread that is distinguishable from all other value= s. >> >> 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=3D[#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=3D[#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 No. This is about the --enable-checking code treating --lambda-fixup as a forbidden symbol and crashing if it is used in the obvious fashion by any code that happens to be native-compiled, which is the current status on scratch/no-purespace. Pip