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#68690: Segmentation fault building with native-comp Date: Fri, 26 Jan 2024 16:30:51 +0200 Message-ID: <86sf2k9nfo.fsf@gnu.org> References: <87wmryel78.fsf@pub.pink> <86zfwud5cv.fsf@gnu.org> <86sf2mcwa2.fsf@gnu.org> <86le8dd7ze.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14055"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 68690@debbugs.gnu.org, monnier@iro.umontreal.ca 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 Fri Jan 26 15:32:24 2024 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 1rTNFo-0003T8-G9 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Jan 2024 15:32:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rTNFP-0001iR-9w; Fri, 26 Jan 2024 09:31:59 -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 1rTNFM-0001hd-3X for bug-gnu-emacs@gnu.org; Fri, 26 Jan 2024 09:31:56 -0500 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 1rTNFL-0007hQ-RL for bug-gnu-emacs@gnu.org; Fri, 26 Jan 2024 09:31:55 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rTNFS-0004oX-6a for bug-gnu-emacs@gnu.org; Fri, 26 Jan 2024 09:32:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Jan 2024 14:32:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68690 X-GNU-PR-Package: emacs Original-Received: via spool by 68690-submit@debbugs.gnu.org id=B68690.170627947018448 (code B ref 68690); Fri, 26 Jan 2024 14:32:02 +0000 Original-Received: (at 68690) by debbugs.gnu.org; 26 Jan 2024 14:31:10 +0000 Original-Received: from localhost ([127.0.0.1]:50740 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTNEc-0004nU-6p for submit@debbugs.gnu.org; Fri, 26 Jan 2024 09:31:10 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59034) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTNEZ-0004nD-8h for 68690@debbugs.gnu.org; Fri, 26 Jan 2024 09:31:08 -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 1rTNEN-0007TE-5T; Fri, 26 Jan 2024 09:30:55 -0500 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=wpdVovKyrLDttZvsyTsTcOBIfdJ5H0hRr4lAkzJuD8o=; b=YoAcVpxZBwh9gyxxUE2Y uDn4b6igGHkj6mhG19wbiKRa6luUhRMmpenPVUh0QaRp6xJ7dRGYjsgiGDEZFAichhVDwDlCSYe9p qA6y/0Oyq9x6ABPknSmvCUNae+UOOs71Vj4P8Gm8imqCXMYiZjalshJtDGHlvQ4UPLRXQO8jjVKdd Vv362k3HOlzbV2ZhRQOuiuZjqE+nJO6RSfnuOFtdeXQdatHbjyLask3dSP7keuHfBL2kaxhwFCn/L gKw+K5ZdQr/nZM6f8FnyqRxH+mdY9gFCIeQ2xFvcOARq/VvOVGEmg3uPvWGEJQ3QDNKjU3f5ufRGK fIu2Hjm52C30dQ==; In-Reply-To: (message from Gerd =?UTF-8?Q?M=C3=B6llmann?= on Fri, 26 Jan 2024 10:26:00 +0100) 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:278929 Archived-At: > From: Gerd Möllmann > Cc: Eli Zaretskii , Stefan Monnier > , jm@pub.pink, 68690@debbugs.gnu.org > Date: Fri, 26 Jan 2024 10:26:00 +0100 > > Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of > text editors" writes: > > > I'm just as lost as you are in pdumper.c, sadly. > > I remembered seeing something in pdumper.c that could be related, namely > > /* Start the cold section. This section contains bytes that should > never change and so can be direct-mapped from the dump without > special processing. */ > dump_drain_cold_data (ctx); > > And if you follow that function you'll see that it treats charsets > specially. AFAIU, that special handling is for dumping fields that are pointers. For example, the string data in a Lisp string, buffer text in a buffer, and the data pointed to by code_space_mask in a charset. But the charset's attributes are not a pointer, they are a Lisp vector. Moreover, the offending charset (ID = 0) is not processed by dump_cold_charset because its code_space_mask is NULL (which makes sense since the dimension of the ASCII charset is 1). > I find the comment about directly mapping very suspicious, when the > charset contains a Lisp_Object, possibly requiring relocation. But it > could well be that I misundertand something here. First, before Stefan's changes there was no Lisp objects in 'struct charset'. And second, what do you mean by "possibly requiring relocation"? Do you mean relocation after restoring from dump, or do you mean relocation during dumping? Or something else entirely?