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#74831: 31.0.50; scratch/igc: segfaults on startup when called under gdb Date: Thu, 12 Dec 2024 18:43:49 +0200 Message-ID: <86frmszwai.fsf@gnu.org> References: <87ikrp3rl3.fsf@no.lan> <86jzc5ymue.fsf@gnu.org> <87cyhw513i.fsf@no.lan> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22680"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 74831@debbugs.gnu.org To: Gregor Zattler Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Dec 12 17:45:41 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 1tLmJn-0005dN-Bz for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 12 Dec 2024 17:45:39 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tLmJP-0000st-2Z; Thu, 12 Dec 2024 11:45:16 -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 1tLmJK-0000rP-Ph for bug-gnu-emacs@gnu.org; Thu, 12 Dec 2024 11:45:12 -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 1tLmJD-0005FV-FI for bug-gnu-emacs@gnu.org; Thu, 12 Dec 2024 11:45:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=4g4yvGoTClE3sGyrl2saIvUARPVFfk75Ox4Jao5Pakk=; b=D9P5mkVxuayxaggTXa7SuSpAg7bkQJ/efhn0dUThnZkl52LfWOEubC0UcpimdH6gMvSNKz/SUOgiOBakZjHNy/haJPewQUXICbr3g5+1SgRlCbOqpQTm43F1s3iw+3OpPmwzz7bII7k8AJWvR0ba/voLKFVNzyuNFMre/QX1ZsXueaqbVB4ILVZHh/EIV5PXeu8sdFjxY6FvCLtmphjeRDNmS1HcO7AODo94FZ7v0C7OLBEDZd1Ea1RPxEDDY7MLGZxyQ21Hy2Yjga+S1FI8kwvZZ1OKudBgTKcXqmkDw3Qop8mMs5AG0aySTHkT2S05OYoAzst9P1LClosONYMo0g==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tLmJD-0003fF-83 for bug-gnu-emacs@gnu.org; Thu, 12 Dec 2024 11:45:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 12 Dec 2024 16:45:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74831 X-GNU-PR-Package: emacs Original-Received: via spool by 74831-submit@debbugs.gnu.org id=B74831.173402187713976 (code B ref 74831); Thu, 12 Dec 2024 16:45:03 +0000 Original-Received: (at 74831) by debbugs.gnu.org; 12 Dec 2024 16:44:37 +0000 Original-Received: from localhost ([127.0.0.1]:40059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLmIj-0003dG-Pw for submit@debbugs.gnu.org; Thu, 12 Dec 2024 11:44:37 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:60362) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tLmIf-0003cc-M7 for 74831@debbugs.gnu.org; Thu, 12 Dec 2024 11:44:33 -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 1tLmIT-00058j-AE; Thu, 12 Dec 2024 11:44:23 -0500 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=4g4yvGoTClE3sGyrl2saIvUARPVFfk75Ox4Jao5Pakk=; b=HB3yvehZ1YVL F1zg8vOL3Ay4yu6xZSBZZK3PHWGJgLA8rRbUnEyGRYIT/iKAItUmq7PcRfq4MmZar9Z4h6UMG879H Sz4F+AWTTiCK+ssnGlLhQ7YvZAzy34gImlHTasemS9Fc8fILAMWwpUSdxhwBgFDKxgZW3cxbf3n+k QuD+oG/n06fooGp4n5b2nUP1HYhQwPQzW1bmqizGA/QmFX1hLQk50EjA4WNrKRTWvQtY8x/4z6FbV ZkEjjkZnToLMVp85R4hFvULXptHPs0ALxL9pcvPFEsrsXjR62IKnlyba4sZlO9LxwlvXN439+AKnr i5poQjxMkv3uUGgxv7sGWw==; In-Reply-To: <87cyhw513i.fsf@no.lan> (message from Gregor Zattler on Thu, 12 Dec 2024 17:15:45 +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:296921 Archived-At: > From: Gregor Zattler > Cc: 74831@debbugs.gnu.org > Date: Thu, 12 Dec 2024 17:15:45 +0100 > > >> Program received signal SIGSEGV, Segmentation fault. > >> 0x0000555555779816 in XSETCDR (c=..., n=n@entry=...) at ./src/lisp.h:1605 > >> 1605 *xcdr_addr (c) = n; > > > > So what is the value of xcdr_addr(s) here? It looks like > > dereferencing it causes the segfault, so its value might give us some > > hints. > > sorry, I'm clueless: > > (gdb) print xcdr_addr > No symbol "xcdr_addr" in current context. No, you should say (gdb) print xcdr_addr(c) > > Also, where did you start GDB? It looks like you started it not from > > the Emacs' src/ directory, > > I started it in the Emacs src directory:: > > (gdb) pwd > Working directory /home/grfz/src/emacs-igc2/src. > > because you once told me to do so for > gdb. That's strange, because if you did that, the backtrace command would have shown a Lisp backtrace as well, which didn't happen. > I now added > > -ex "source /home/grfz/src/emacs-igc2/src/.gdbinit" > > to my gdb invocation and tried again. > Now there are plenty of > > Program received signal SIGSEGV, Segmentation fault. That's expected. > lines in GDBs output but Emacs runs and > and (not so far) functions correct. > > > before running Emacs. That's because the MPS library uses SIGSEGV for > > its memory barriers, and .gdbinit there makes sure such SIGSEGVs don't > > stop Emacs. IOW, this could be a false positive, not a real segfault. > > That seemed to be the case. Yes. I think we can close this bug now.