From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Newsgroups: gmane.emacs.bugs Subject: bug#68690: Segmentation fault building with native-comp Date: Fri, 26 Jan 2024 15:47:06 +0100 Message-ID: References: <87wmryel78.fsf@pub.pink> <86zfwud5cv.fsf@gnu.org> <86sf2mcwa2.fsf@gnu.org> <86le8dd7ze.fsf@gnu.org> <86sf2k9nfo.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="20817"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: 68690@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 26 15:48:09 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 1rTNV2-0005DT-RX for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Jan 2024 15:48:08 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rTNUr-0000RP-Oq; Fri, 26 Jan 2024 09:47: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 1rTNUq-0000Ki-92 for bug-gnu-emacs@gnu.org; Fri, 26 Jan 2024 09:47: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 1rTNUq-00039E-0T for bug-gnu-emacs@gnu.org; Fri, 26 Jan 2024 09:47:56 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rTNUw-0005E4-60 for bug-gnu-emacs@gnu.org; Fri, 26 Jan 2024 09:48:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Gerd =?UTF-8?Q?M=C3=B6llmann?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Jan 2024 14:48: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.170628044219912 (code B ref 68690); Fri, 26 Jan 2024 14:48:02 +0000 Original-Received: (at 68690) by debbugs.gnu.org; 26 Jan 2024 14:47:22 +0000 Original-Received: from localhost ([127.0.0.1]:50771 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTNUH-0005B6-KZ for submit@debbugs.gnu.org; Fri, 26 Jan 2024 09:47:22 -0500 Original-Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]:49534) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTNUF-0005At-TD for 68690@debbugs.gnu.org; Fri, 26 Jan 2024 09:47:21 -0500 Original-Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-55d4013f3e0so258112a12.3 for <68690@debbugs.gnu.org>; Fri, 26 Jan 2024 06:47:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706280427; x=1706885227; darn=debbugs.gnu.org; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wmTM7dKHxaGLAVidHQxUfrZJCliUU3l3opeicpHfuZs=; b=WSD8hGyWxTVRKpxYYu1Ok5B/lb9ZUqWPbrbPKLf27LagOlY+xYYBeBnwXmF7/IxAYP 934KnrGKa3xiUHtnd7b5SlWWBryCo8l8F4Oh3WZaM5xR7YyoblTo1byuKhLCtauVEbNe jvbbe/GRSH82jkUh6ZzmIt/bzFDK/H3efrXmsufcCFKCmp3qMNO+W9hdTlzXX4JFPA1M yjFx5Wpj0V9eKuWQrw+9U/Hr13qmmd68OZHRUMVvJkeiXRcpNDyBJs0OjCD9v6VuURwi EPR+1NHtJkofsw6KHiqiQPNRBX8MZqb20EiLfxMxCarQIFglWDDv4h2Z2FaLbSo18oOI Z56Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706280427; x=1706885227; h=content-transfer-encoding:mime-version:user-agent:message-id:date :references:in-reply-to:subject:cc:to:from:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=wmTM7dKHxaGLAVidHQxUfrZJCliUU3l3opeicpHfuZs=; b=v8DVzrMfOxLwEXGw0V09BEO19raI2LVXQN4T8bp1vkDYm8H3WUhO1plSQeklF5Zqn+ TScBMy38lHL9hi7rfWVLDb8QWudJnMGXD1PpRe5RI7nHn9Ktqom2eyAcqHFMc/debnV5 2XYg35NL3+/I0y9eUj6lOFCTsnhW1KWhpUxX+ie/H6XXzgPEnBbSW+VZ8YwiZqDrMmjQ iZCXg/2jK3Hr2HuyXfAWi9lA3zlPC76+AVmKtM6h0yaqPZtDBCFwNrHE5ZJMEeWdWulW 2a/F0IzjYlVDaaCY0ylHF1XJxXbADNo05cqCE+Mf38ZzTVL+BZwwMAB9tNzmZ+/z0wxe OGMg== X-Gm-Message-State: AOJu0Yyt3FS4yhpTEs5MMSjwwyXGLYDdFmwZDpWWjE/rNaSVbWcWLj41 tdxOBZuqdnNIu2ztZo0shZRoAwC7l5+fzn2WaqkXJDILim9ZGbuV X-Google-Smtp-Source: AGHT+IFcNRolARMmOCNEln3uOKcG1ZjjBMsL5F8+pzaR2/30TQm7MXa8qHMyhqZQTyqa5+mNqnIB0g== X-Received: by 2002:aa7:cf12:0:b0:547:9f26:e581 with SMTP id a18-20020aa7cf12000000b005479f26e581mr944927edy.37.1706280427301; Fri, 26 Jan 2024 06:47:07 -0800 (PST) Original-Received: from Pro.fritz.box (pd9e36b3f.dip0.t-ipconnect.de. [217.227.107.63]) by smtp.gmail.com with ESMTPSA id i9-20020aa7c709000000b0055c340e2ad8sm653388edq.19.2024.01.26.06.47.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Jan 2024 06:47:06 -0800 (PST) In-Reply-To: <86sf2k9nfo.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 26 Jan 2024 16:30:51 +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:278932 Archived-At: Eli Zaretskii writes: >> From: Gerd M=C3=B6llmann >> Cc: Eli Zaretskii , Stefan Monnier >> , jm@pub.pink, 68690@debbugs.gnu.org >> Date: Fri, 26 Jan 2024 10:26:00 +0100 >>=20 >> Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of >> text editors" writes: >>=20 >> > I'm just as lost as you are in pdumper.c, sadly. >>=20 >> I remembered seeing something in pdumper.c that could be related, namely >>=20 >> /* 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); >>=20 >> 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. > We're probably talking about different things. I was talking about the fact that struct charset, before Stefan's change, sonsisted of, basically, integers only (no pointer, nothing), so that it could just be dumped as-is, and, after loading the dump file, used as-is. > Moreover, the offending charset (ID =3D 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'. My point. > 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? Lisp_Object fields require writing something to the dump file that can be used, when the dump is loaded, to compute the real value in the the new Emacs session. So, something is done when dumping, and when loading.