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: Excessive use of `eassert` Date: Tue, 23 Jan 2024 20:16:35 +0200 Message-ID: <86bk9b6hks.fsf@gnu.org> References: <83jzo5x0q8.fsf@gnu.org> <83sf2tv029.fsf@gnu.org> <811d5f03-fad4-47e1-b3fd-2f45229a5ee1@cs.ucla.edu> <1bcc2fc4-da9f-488e-b416-ef4443a3da65@cs.ucla.edu> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="29454"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@iro.umontreal.ca, acm@muc.de, emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Jan 23 19:17:17 2024 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 1rSLKn-0007SQ-Jh for ged-emacs-devel@m.gmane-mx.org; Tue, 23 Jan 2024 19:17:17 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rSLKB-0006Sr-NP; Tue, 23 Jan 2024 13:16:39 -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 1rSLK8-0006Sg-Sz for emacs-devel@gnu.org; Tue, 23 Jan 2024 13:16:37 -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 1rSLK7-0005cP-LI; Tue, 23 Jan 2024 13:16:35 -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=Mz0pbfPpuOOkGUAyTcrs8kLY2oTA/soqzgzQlqrsv3Y=; b=HYk+Gf7FluOc 3vtqNfdwFyDBrgEgz8Wa48yVDVz5bW8WvizAVqFjlut+I3jqkhTxpz13sXS80t1NZCG7KmBHnLILn 7Ju89vprGTc8RMgEKS9QedhB73J/XIoxnhLfSNX5CSQtHGAcDxwHAuPXKTQwBrhPaiPwO6kRjvGu0 YopLiMsHSM8s1mF3+pcdykpM70MuMNJxEJDR8IOc6892my8ipxiL6oi03kW5KJZGd967lVkky2yNe zkei6TCjfJaP/29zV0CGoxUG6GGej6FvO0kEyMBzlqyl4uqniDgyT3Ggl3B50bI0krkroTQaI+B4p hdv83vId34Dd+Buu1i7BSQ==; In-Reply-To: (message from Paul Eggert on Tue, 23 Jan 2024 00:15:03 -0800) 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:315267 Archived-At: > Date: Tue, 23 Jan 2024 00:15:03 -0800 > Cc: Alan Mackenzie , Eli Zaretskii , > emacs-devel@gnu.org > From: Paul Eggert > > On 2024-01-22 05:20, Stefan Monnier wrote: > > Compared to the patch I proposed this has the downside that it > > duplicates the logic between `lisp_h_builtin_lisp_symbol` and > > `make_lisp_symbol` > Yes, when --enable-checking is used the tradeoff is: would we rather > omit all runtime checking in make_lisp_symbol (the patch you proposed), > or omit it only for builtin symbols (the patch I installed)? > > For builtin symbols like Qnil and Qt the runtime checking is not all > that useful - if these symbols' data items are improperly aligned Emacs > will crash early anyway. For non-builtin symbols the runtime checking is > arguably useful, to catch (presumably rare) alignment bugs in the memory > allocator. > > If you'd rather have the simpler solution that doesn't catch alignment > bugs in non-builtin symbols, I could prepare a patch along those lines. > Any such alignment bugs are pretty unlikely, after all. I think we should settle for builtin symbols, since the other kind is unlikely to cause any significant slowdown, and the extra level of testing is valuable in debug builds. I hope Stefan will agree.