From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#68690: Segmentation fault building with native-comp Date: Thu, 25 Jan 2024 21:43:01 -0500 Message-ID: References: <87wmryel78.fsf@pub.pink> <86zfwud5cv.fsf@gnu.org> <86sf2mcwa2.fsf@gnu.org> <86le8dd7ze.fsf@gnu.org> Reply-To: Stefan Monnier 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="29893"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: jm@pub.pink, 68690@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Jan 26 03:44:17 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 1rTCCV-0007bg-F4 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 26 Jan 2024 03:44:15 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rTCCJ-0006Fp-RT; Thu, 25 Jan 2024 21:44:03 -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 1rTCCC-0006FX-PO for bug-gnu-emacs@gnu.org; Thu, 25 Jan 2024 21:43:57 -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 1rTCCC-0002hL-H5 for bug-gnu-emacs@gnu.org; Thu, 25 Jan 2024 21:43:56 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rTCCI-0004xz-Ep for bug-gnu-emacs@gnu.org; Thu, 25 Jan 2024 21:44:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 26 Jan 2024 02:44: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.170623700619039 (code B ref 68690); Fri, 26 Jan 2024 02:44:02 +0000 Original-Received: (at 68690) by debbugs.gnu.org; 26 Jan 2024 02:43:26 +0000 Original-Received: from localhost ([127.0.0.1]:49806 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTCBi-0004x0-BZ for submit@debbugs.gnu.org; Thu, 25 Jan 2024 21:43:26 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:21796) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rTCBh-0004wn-Bq for 68690@debbugs.gnu.org; Thu, 25 Jan 2024 21:43:25 -0500 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id B6FB1100068; Thu, 25 Jan 2024 21:43:13 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1706236992; bh=tKKam8J1ckJDmYaOgYVxts5eZpBSLX+C+uNgc5dxQkI=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=R3hXKUqOl0FMLzy/d2np6BjUDZacL4qnBzc2uo8XLjktEMc2dt2y0Oq4k/1GNNXZD JvPzEaxsvP2TAiSBoWdhx3Q1pyHXfxyIWfL2uPQAwVrAEr5teNAyItNCDltfik5dHD syh1aI87ME9TvyYhJp+5tycRuI5PADIdgcmkhEtJyRuK1y4Ars/Uhbv52blHYhdLcx 2HINiU7Z0tq4M49XVP0xHDbZStzOGbyl9qSgXoh0xjLQUAXv+099Aj3G1uodP0by3n 4e+oUwIjtCGD6Kv5rjtqFZpo2UPzQGAr1qny9t9sarJm612Nxd1dyRGLKkO9ME4dru hRH0AzZ7Dwzuw== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id C3D8F10004C; Thu, 25 Jan 2024 21:43:12 -0500 (EST) Original-Received: from pastel (unknown [45.72.206.68]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8385E120BC8; Thu, 25 Jan 2024 21:43:12 -0500 (EST) In-Reply-To: <86le8dd7ze.fsf@gnu.org> (Eli Zaretskii's message of "Thu, 25 Jan 2024 12:26:29 +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:278894 Archived-At: >> Hmm... I can't reproduce it here (even with native-comp and >> `--with-wide-int`). > This build is without native-comp, but it's a 32-bit build. Did you > try that? I think that's the key to unlock this (see below). I tried 32bit with and without native-comp, and with and without wide-int, but can't reproduce it here. Maybe it only manifest itself under w32? In your message I see it crashes compiling `mwheel.el`; is that the first place where it crashes? Does it crash on most other files as well? In interactive use? >> The above stack frame suggests it might be related >> to commit 33b8d5b6c5a (and hence unrelated to the original bug#68690 >> which was a bug in `DOHASH`). >> Any chance you can investigate what is this `0x92348b000000000`? > It's obviously a bogus value, since Lisp objects in this build should > have their high 32 bits zero except for the type tag in the MSBs. Indeed. >> It should be a charset's attributes and the "idx=3D1" is because >> we're using `CHARSET_ATTR_NAME` to extract the name. > It sounds like we are not dumping the charset attributes correctly, > and that also corrupts all the fields of a struct charset following > the attributes. Here's this charset in temacs: [...] > (gdb) p cs->attributes > $3 =3D XIL(0xa000000009023d88) [...] > And here's the same charset in emacs, after we restore from dump: [...] > attributes =3D XIL(0x92848b000000000), Yup, sure looks like the bytes got shifted by 4 bytes for some reason. > I tried to figure out what is wrong with how we dump this new field, > but got lost in the proverbial twisty little passages of pdumper.c, > all alike. =F0=9F=99=81 > For example, I cannot understand why some fields which are > Lisp objects are dumped with dump_field_lv while others with > dump_field_lv_or_rawptr, and what is the significance of WEIGHT_NORMAL > vs WEIGHT_STRONG. Hopefully, the above gives enough information for > you to figure this out. I'm just as lost as you are in pdumper.c, sadly. Stefan