From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Richard Stallman 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 00:07:00 -0500 Message-ID: References: <166844679660.19180.3470364122428955894@vcs2.savannah.gnu.org> <20221114172637.78215C0E4C7@vcs2.savannah.gnu.org> <871qq5hxf9.fsf@yahoo.com> <9c27dd84e3298e2ed979415016f2db75d1cef882.camel@gmail.com> Reply-To: rms@gnu.org Content-Type: text/plain; charset=Utf-8 Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11977"; mail-complaints-to="usenet@ciao.gmane.io" Cc: akrl@sdf.org, luangruo@yahoo.com, emacs-devel@gnu.org To: vibhavp@gmail.com Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Nov 18 06:07:27 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 1ovtb5-0002w5-E0 for ged-emacs-devel@m.gmane-mx.org; Fri, 18 Nov 2022 06:07:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ovtaj-0008Hh-72; Fri, 18 Nov 2022 00:07:06 -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 1ovtag-0008HG-Bh for emacs-devel@gnu.org; Fri, 18 Nov 2022 00:07:02 -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 1ovtaf-0001xa-FA; Fri, 18 Nov 2022 00:07:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=Date:References:Subject:In-Reply-To:To:From: mime-version; bh=RzPfDJ40pX2e9W27cPnLOoQNBk/9nbtL9/zSPw/mb6g=; b=FNzMVBzQJBGu VBXB2cHNJvRnlgtJ+HO+ncrYe8sndDjyY0C9NtjEGKKU7jymLx0LrWcG8yLsL2KZ3uJdHFspXc+iZ xrfSF8xIqQqKZNc/8FLK2rKAZOTN2VDMAOsShKYMizsuUOOXB5tHSuxUYVPUJZ3sbn2eTrlmM3ckV MkM00ENE4mMO8awi8t964jX22oL22ZR5RpLGrOr28ZJHcEH/1wictDQ9frS7rfgBG4+PweL44sgW4 YIMFnSeX01mWIaD6rQF/3PKMxivMXePWCE9lqtNEbKefgvjeP79ScvveInXg0VsOovnlsrixNnG2K GQQza8rUy+n6IfiUi9UDxA==; Original-Received: from rms by fencepost.gnu.org with local (Exim 4.90_1) (envelope-from ) id 1ovtae-0005d9-Mh; Fri, 18 Nov 2022 00:07:00 -0500 In-Reply-To: <9c27dd84e3298e2ed979415016f2db75d1cef882.camel@gmail.com> (message from Vibhav Pant on Thu, 17 Nov 2022 14:16:19 +0530) 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:300081 Archived-At: [[[ To any NSA and FBI agents reading my email: please consider ]]] [[[ whether defending the US Constitution against all enemies, ]]] [[[ foreign or domestic, requires you to follow Snowden's example. ]]] > 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. -- Dr Richard Stallman (https://stallman.org) Chief GNUisance of the GNU Project (https://gnu.org) Founder, Free Software Foundation (https://fsf.org) Internet Hall-of-Famer (https://internethalloffame.org)