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: Fri, 03 Jan 2025 22:36:42 +0000 Message-ID: <87ikqvikzr.fsf@protonmail.com> References: <87frml9cy4.fsf@protonmail.com> <875xng9g48.fsf@protonmail.com> <87ttaz98q1.fsf@protonmail.com> <87y10b77p7.fsf@protonmail.com> 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="30879"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Stefan Kangas , Andrea Corallo , =?utf-8?Q?Gerd_M=C3=B6llmann?= , Eli Zaretskii , monnier@iro.umontreal.ca To: "Pip Cet via \"Emacs development discussions.\"" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Jan 04 07:50:20 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 1tTxzH-0007ri-O0 for ged-emacs-devel@m.gmane-mx.org; Sat, 04 Jan 2025 07:50:19 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tTxyD-0007Bl-Fj; Sat, 04 Jan 2025 01:49:13 -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 1tTqHj-0002kh-K6 for emacs-devel@gnu.org; Fri, 03 Jan 2025 17:36:51 -0500 Original-Received: from mail-4316.protonmail.ch ([185.70.43.16]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tTqHh-00070H-Lg; Fri, 03 Jan 2025 17:36:51 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1735943807; x=1736203007; bh=WtkbE8/XrwFGUDGekqbruEdOm9gN0O8A1K4R8UyCn+Y=; 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=agZoIDhXi0I7rBEM/ZX0x5bnl3kOOu8yr3Un0T7cECWCiFVsszacrjwe791t93JfH HRb+HJFwSzhbDmCEb6z0XqlMuPMY1HBqeOn4zlZ62G13sRPqJIvxjjja2WT8XI+Ct+ 0hp77eUGymZtnqqWGwT/wF6OJ62w+8USCkK3CeZWFs/HyQqM7QzTWnMEuBkdat0reY op6lDWPcNJQvDdv3QCb/q7CL4+7PtI99XUAF2xGjDIjwyUt96YkKDpgRgWRAFtE7+6 Gd8jOUEtIdukfnnMaz1HjwVawLGKT9721tv0iWkWdE0XA67BqTlmoEO02hFcBHT9Je rdg19Gr26U95g== In-Reply-To: <87y10b77p7.fsf@protonmail.com> Feedback-ID: 112775352:user:proton X-Pm-Message-ID: 30165b5e4b24329170fba0eaa8859a07fc9e7e10 Received-SPF: pass client-ip=185.70.43.16; envelope-from=pipcet@protonmail.com; helo=mail-4316.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_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, 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 01:49:11 -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:327649 Archived-At: "Pip Cet via \"Emacs development discussions.\"" writ= es: > "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 w= e >>>> 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=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. Pip