From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#39962: 27.0.90; Crash in Emacs 27.0.90 Date: Sat, 7 Mar 2020 23:42:51 -0800 Organization: UCLA Computer Science Department Message-ID: <329e58b1-6255-311e-bdd8-b6f5b3d5208f@cs.ucla.edu> References: <24162.58107.725366.668639@cochabamba.vanoostrum.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------61FE90C72FF65D80819050E8" Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="109650"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 Cc: 39962@debbugs.gnu.org To: Pieter van Oostrum Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 08 08:43:13 2020 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 1jAqae-000SRc-S1 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 Mar 2020 08:43:12 +0100 Original-Received: from localhost ([::1]:55630 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAqad-0007H4-Uv for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 Mar 2020 03:43:11 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44825) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAqaV-0007Gj-Qy for bug-gnu-emacs@gnu.org; Sun, 08 Mar 2020 03:43:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jAqaU-00077j-NP for bug-gnu-emacs@gnu.org; Sun, 08 Mar 2020 03:43:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41877) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jAqaU-00077d-Ke for bug-gnu-emacs@gnu.org; Sun, 08 Mar 2020 03:43:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jAqaU-0005NQ-Hj for bug-gnu-emacs@gnu.org; Sun, 08 Mar 2020 03:43:02 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <24162.58107.725366.668639@cochabamba.vanoostrum.org> Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Mar 2020 07:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 39962 X-GNU-PR-Package: emacs Original-Received: via spool by 39962-submit@debbugs.gnu.org id=B39962.158365338120660 (code B ref 39962); Sun, 08 Mar 2020 07:43:02 +0000 Original-Received: (at 39962) by debbugs.gnu.org; 8 Mar 2020 07:43:01 +0000 Original-Received: from localhost ([127.0.0.1]:47850 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jAqaS-0005NA-M6 for submit@debbugs.gnu.org; Sun, 08 Mar 2020 03:43:00 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:56866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jAqaQ-0005Mx-UZ for 39962@debbugs.gnu.org; Sun, 08 Mar 2020 03:43:00 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 2E78B16009E; Sat, 7 Mar 2020 23:42:53 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id w80DdQ-Gw9d9; Sat, 7 Mar 2020 23:42:52 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 5D7B81600AF; Sat, 7 Mar 2020 23:42:52 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id JslI0DXmBCF7; Sat, 7 Mar 2020 23:42:52 -0800 (PST) Original-Received: from [192.168.1.9] (cpe-23-242-74-103.socal.res.rr.com [23.242.74.103]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 3240F16009E; Sat, 7 Mar 2020 23:42:52 -0800 (PST) Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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" Xref: news.gmane.io gmane.emacs.bugs:177042 Archived-At: This is a multi-part message in MIME format. --------------61FE90C72FF65D80819050E8 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit > In GNU Emacs 27.0.90 (build 1, i686-apple-darwin10.0.0, NS appkit-1561.61 Version 10.13.6 (Build 17G11023)) "i686"? Are you building a 32-bit executable? If so, does the problem go away if you build the more-typical 64-bit executable? What compiler and version are you using? And what GDB version are you using? > (gdb) p args[0] > $25 = XIL(0x3960) > (gdb) xtype > Lisp_Symbol > (gdb) xsymbol > $26 = (struct Lisp_Symbol *) 0x3af8 > Cannot access memory at address 0x3b00 Something's wrong here. xsymbol should have output something like: $8 = (struct Lisp_Symbol *) 0x10515f0 Try this instead (my examples show output on my Ubuntu 18.04 x86-64 platform): (gdb) p args[0] $25 = XIL(0x3960) (gdb) xgetsym $25 (gdb) p $ptr $27 = (struct Lisp_Symbol *) 0x10515f0 I assume yours will output something like "$27 = (struct Lisp_Symbol *) 0x3af8" instead. If so, try this: (gdb) xgetptr $25 (gdb) p/x $ptr $28 = 0x3960 Assuming you get that, try this: (gdb) p ((struct Lisp_Symbol *) ((char *)lispsym + 0x3960)) $29 = (struct Lisp_Symbol *) 0x10515f0 I assume yours will output something like "$29 = (struct Lisp_Symbol *) 0x3af8" instead. If so, please try this: (gdb) p (char *)lispsym $30 = 0x104dc90 "\230\001" (gdb) p (char *)&lispsym[0] $31 = 0x104dc90 "\230\001" My *guess* is that the above two lines will differ due either to a bug in your compiler or in your debugger. Your $30 will equal 408. If I'm right, the attached patch should work around your compiler/debugger bug. Of course this will merely help you debug Emacs; it won't fix the original bug you reported. So if this fixes your problem please redo the backtrace info Eli asked for. --------------61FE90C72FF65D80819050E8 Content-Type: text/x-patch; charset=UTF-8; name="t.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="t.diff" diff --git a/src/.gdbinit b/src/.gdbinit index 5dd0133715..bf602b98ad 100644 --- a/src/.gdbinit +++ b/src/.gdbinit @@ -72,7 +72,7 @@ end define xgetsym xgetptr $arg0 - set $ptr = ((struct Lisp_Symbol *) ((char *)lispsym + $ptr)) + set $ptr = ((struct Lisp_Symbol *) ((char *)&lispsym[0] + $ptr)) end # Access the name of a symbol --------------61FE90C72FF65D80819050E8--