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: scratch/comp-static-data 5aa3db2f11: comp: Add support for compiling elisp constants into static data. Date: Fri, 18 Nov 2022 10:28:26 +0200 Message-ID: <83zgcobr9x.fsf@gnu.org> References: <166844679660.19180.3470364122428955894@vcs2.savannah.gnu.org> <20221114172637.78215C0E4C7@vcs2.savannah.gnu.org> <871qq5hxf9.fsf@yahoo.com> <9c27dd84e3298e2ed979415016f2db75d1cef882.camel@gmail.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14391"; mail-complaints-to="usenet@ciao.gmane.io" Cc: vibhavp@gmail.com, akrl@sdf.org, luangruo@yahoo.com, emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 18 09:28:49 2022 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 1ovwjw-0003S7-Rp for ged-emacs-devel@m.gmane-mx.org; Fri, 18 Nov 2022 09:28:49 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovwjZ-0000EE-W6; Fri, 18 Nov 2022 03:28:26 -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 1ovwjY-0000Dd-An for emacs-devel@gnu.org; Fri, 18 Nov 2022 03:28:24 -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 1ovwjY-0006dj-1b; Fri, 18 Nov 2022 03:28:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Zsqd+NBHW1zt2v81/BcmO+iSlAhnozTIhlUuhOwI5Ik=; b=br3tl2WaO6HI aB6uTWQ3c8CorpMsC77BO3lCrYobVQdLbglPe/+XHuv8qsbW5G1QgOpMa5yAbi1JgDS2u5BQqiceC uTTN+ogWyl2VcvQ2NNZqSsQlZqIhzNb1nLlNQTvYjI58LN6RO2esGt57NrwTt0+YcVb613OKvANKP jI8UACEHB03h61T+sWI9b1+ezF/F/xGB3TUxSVUflyIGRg2F1C2yUUUdeA9XuNYwtaIGd/UimzFEX WldI/LuoIXZL+e2I51spX4HgZDRzs57hXNsyMJCwcByZLH0/fTG8L3OWS1Jj9x4krdyqSc2XPAeUt vUub63G4erQ0E49BnekGuQ==; Original-Received: from [87.69.77.57] (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 1ovwjW-0008Cm-Tv; Fri, 18 Nov 2022 03:28:23 -0500 In-Reply-To: (message from Richard Stallman on Fri, 18 Nov 2022 00:07:00 -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:300096 Archived-At: > From: Richard Stallman > Cc: akrl@sdf.org, luangruo@yahoo.com, emacs-devel@gnu.org > Date: Fri, 18 Nov 2022 00:07:00 -0500 > > > Perhaps "constant" is a misnomer here. If you are refering to defconst- > > defined variables, that is not what the patch is about. I'm refering to > > self-evaluating forms/objects referenced by elisp code, i.e. the ones > > that the constant vector in a bytecode object contains. The elisp > > reference manual states that mutating self-evaluating forms results in > > undefined behaviour, so marking them as const should be safe IMO. > > Your change "ought to be" harmless in principle, but in practice it > may be harmful. There may be cases that are currently "incorrect" in > principle but in practice do no harm. Your change might cause them to > get faults for trying to write read-only memory. Why take that risk? > > I'd rather avoid risk by not making this change. I'm not aware of any aspect of the change which would cause crashes in these cases. Vibhav, if this is true, please show the relevant code in your branch, and explain how it works and in what cases it causes an abort. Thanks.