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#66743: 30.0.50; Crash when dumping reftex Date: Thu, 26 Oct 2023 10:35:23 +0300 Message-ID: <83lebphm4k.fsf@gnu.org> References: <875y2v592c.fsf@localhost> <83a5s6kgxx.fsf@gnu.org> <87wmvadfkw.fsf@localhost> <83jzraisg0.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22369"; mail-complaints-to="usenet@ciao.gmane.io" Cc: yantar92@posteo.net, 66743@debbugs.gnu.org To: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Oct 26 09:35:55 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 1qvuuI-0005W5-L4 for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 26 Oct 2023 09:35:54 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvuty-0007xg-7f; Thu, 26 Oct 2023 03:35:34 -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 1qvutv-0007xB-Rx for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 03:35:32 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qvutv-0003f4-JN for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 03:35:31 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qvuuP-0001Xh-Pg for bug-gnu-emacs@gnu.org; Thu, 26 Oct 2023 03:36:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 26 Oct 2023 07:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 66743 X-GNU-PR-Package: emacs Original-Received: via spool by 66743-submit@debbugs.gnu.org id=B66743.16983057545902 (code B ref 66743); Thu, 26 Oct 2023 07:36:01 +0000 Original-Received: (at 66743) by debbugs.gnu.org; 26 Oct 2023 07:35:54 +0000 Original-Received: from localhost ([127.0.0.1]:60515 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvuuH-0001X7-K3 for submit@debbugs.gnu.org; Thu, 26 Oct 2023 03:35:53 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:54650) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qvuuF-0001Wt-Oc for 66743@debbugs.gnu.org; Thu, 26 Oct 2023 03:35:52 -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 1qvutf-0003Yz-Bz; Thu, 26 Oct 2023 03:35:15 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=oMjdgCPi0w9v/t3g0pjNmw5ORe7XAIjlTxtLrl1C1Mg=; b=XAk2SaHhDxtA46TRW1Ir oumEw8Kcyv5MPwNPDscjSJvejLlXkwWGI7ABn75d0FIJHIunTR/OO2qMBKZExDNjbuGUB4A++9tb4 oPLw9uJ4wqnurfT574Xj0uCYE79Bo+Dgy1OT+hcDBYw+ngA/1Z6Tia7Iv6K/uwoUdV59APA5h7bug l5HxUHliY0JTELyJDlqQauta7oF4B0nEjkcBtLLkRGogxezM4pVe19o4Xy3pA5U9sVwltYWF6ZhNW IFyR6cqggvizJjPbXnKEA50T0Pe3U6zeRctC3a+kJLEUS8zH6dbZlcLyx5+N3Jab3mxCsp6hOpQp0 zd+8F6h/Agpz3A==; In-Reply-To: (message from Gerd =?UTF-8?Q?M=C3=B6llmann?= on Thu, 26 Oct 2023 09:03:33 +0200) 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:273249 Archived-At: > From: Gerd Möllmann > Cc: yantar92@posteo.net, 66743@debbugs.gnu.org > Date: Thu, 26 Oct 2023 09:03:33 +0200 > > Gerd Möllmann writes: > > > Eli Zaretskii writes: > > > >> Emacs is always dumped with a few buffers, because temacs needs them > >> to do the dumping. See this comment text from buffer.c: > >> > >> Implementation notes: the buffers we carry from temacs are: > >> " prin1", "*scratch*", " *Minibuf-0*", "*Messages*", and > >> " *code-conversion-work*". They are created by > >> init_buffer_once and init_window_once (which are not called > >> in the dumped Emacs), and by the first call to coding.c > >> routines. > > > > Thanks. > > > > So, one idea would be to try and move the creation of these buffers from > > the init_*_once functions to the "normal" init functions, and see what > > happens. One would also have to take a closer look at coding.c, of course. > > Actually, this is bug#59029, sort of. > > TLDR is that the code to dump itrees is there, somewhere in git, but has > an infinite recursion bug. So, I guess it should first be tried to > revive that code and fix it (tests should also exist, IIUC). Feel free to do that, of course. However, from where I stand, we should first find and fix the other bugs caused by re-dumping, of the kinds described in bugs 66741 and 66742 (there are more problems like that). Ideally, we need to understand why these problems happen, and develop a protocol for initializing things in a way that avoids such problems. Only after that should we turn our attention to more specific aspects like itrees etc. We should also have some policy for what should never be dumped, I think -- those will have to be nullified or deleted before dumping.