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.bugs Subject: bug#63988: 30.0.50; Recent header line format changes cause spin/seg fault with format-mode-line Date: Sat, 10 Jun 2023 11:56:28 +0300 Message-ID: <83wn0bzoeb.fsf@gnu.org> References: <831qij24qm.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16842"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 63988@debbugs.gnu.org, Stefan Monnier To: aaronjensen@gmail.com, Eshel Yaron Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jun 10 10:57:18 2023 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1q7uPO-0004Fq-A4 for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 10 Jun 2023 10:57:18 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q7uPA-0005DW-1V; Sat, 10 Jun 2023 04:57:04 -0400 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 1q7uP8-0005DJ-Fq for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2023 04:57:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q7uP8-0007UU-76 for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2023 04:57:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q7uP8-0002RU-2h for bug-gnu-emacs@gnu.org; Sat, 10 Jun 2023 04:57:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 10 Jun 2023 08:57:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63988 X-GNU-PR-Package: emacs Original-Received: via spool by 63988-submit@debbugs.gnu.org id=B63988.16863873899347 (code B ref 63988); Sat, 10 Jun 2023 08:57:02 +0000 Original-Received: (at 63988) by debbugs.gnu.org; 10 Jun 2023 08:56:29 +0000 Original-Received: from localhost ([127.0.0.1]:33251 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7uOb-0002Qh-AZ for submit@debbugs.gnu.org; Sat, 10 Jun 2023 04:56:29 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37122) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q7uOY-0002QU-QU for 63988@debbugs.gnu.org; Sat, 10 Jun 2023 04:56:27 -0400 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 1q7uOR-0007Qz-IL; Sat, 10 Jun 2023 04:56:20 -0400 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=llzM1RCe1fg9bUBP0KkAPi/kXrF4C9VCsfDOvKEMNq0=; b=iZVpqtFnk6Jb 97FyaDVk3sRw269t4fVlL9UEDT4J5vtw9+kddES5CfPjT7E9WAoh9ReTFKsgomy3RhPDrLJIb1bt9 8d0jbK0Eo18wl41TxjVpmS0OIfOY/+4gAqFA9ywbcspPpStlmY944kPg/JMhqd0ZKj8FqMjiD1O7X 32v029dEt4JYxvcN1I6T3yL1659pTbc9xplptdu6wVtgB4iaPw64I+1sDWVWEu5v0ERjLAjKUMB1b Q9vTL28xd0Nb7GxZ8RSuMlAqejQ6RYSQkKCjQC64QFccvEDAY+USIkjBbPuFqqr7PGse4ONFWiE/I caX3NDOMlpNKYWFOT9rHmw==; 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 1q7uOQ-0001zF-K3; Sat, 10 Jun 2023 04:56:18 -0400 In-Reply-To: <831qij24qm.fsf@gnu.org> (message from Eli Zaretskii on Sat, 10 Jun 2023 09:47:29 +0300) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:263202 Archived-At: > Cc: 63988@debbugs.gnu.org > Date: Sat, 10 Jun 2023 09:47:29 +0300 > From: Eli Zaretskii > > > From: Aaron Jensen > > Date: Fri, 09 Jun 2023 21:09:45 -0400 > > > > > > (setq header-line-format '(:eval (format-mode-line ""))) > > > > This causes Emacs to spin as of commit: > > 4f66cbbfe520ee31ef26676e09a926217d9736fe > > > > After some time, it will segfault. > > It causes infinite recursion, since format-mode-line also calls > window_wants_header_line (indirectly). > > But what is the purpose of such a strange (to use a civilized word) > setting of header-line-format? Why do you need :eval at all in this > case? > > IOW, why not say "don't do that" and be done? For now, I installed a semi-kludgey fix. However, I wonder whether we should rethink this minor feature. Perhaps this minor convenience is not worth the complications? window_wants_header_line is called in many places, all of which can now evaluate arbitrary Lisp, and all of which can now GC. I've audited the various callers, and didn't see anything obvious that could cause problems with calling Lisp or GC in those places, but I could have missed something. This is actually a general issue with Emacs: we keep piling one minor feature upon another, and don't always reflect on the hard-to-maintain monster that creates. We have already a couple of areas in the code base where we are afraid of making changes, because we don't have a good understanding of the complicated state variables there. Maybe we should reject such minor features instead of keeping doing what we have been doing? So maybe we should declare this feature a failed experiment and remove it?