From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Pieter van Oostrum Newsgroups: gmane.emacs.bugs Subject: bug#39962: 27.0.90; Crash in Emacs 27.0.90 Date: Sun, 08 Mar 2020 10:34:20 +0100 Message-ID: References: <24162.58107.725366.668639@cochabamba.vanoostrum.org> <329e58b1-6255-311e-bdd8-b6f5b3d5208f@cs.ucla.edu> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="31390"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.90 (darwin) Cc: 39962@debbugs.gnu.org, Pieter van Oostrum To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Mar 08 10:35:18 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 1jAsL8-00084h-7m for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 Mar 2020 10:35:18 +0100 Original-Received: from localhost ([::1]:56398 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAsL7-00078N-81 for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 08 Mar 2020 05:35:17 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57273) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jAsKv-00077y-AG for bug-gnu-emacs@gnu.org; Sun, 08 Mar 2020 05:35:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jAsKt-0007bT-W2 for bug-gnu-emacs@gnu.org; Sun, 08 Mar 2020 05:35:05 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:41936) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jAsKs-0007as-2G for bug-gnu-emacs@gnu.org; Sun, 08 Mar 2020 05:35:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jAsKr-0001bD-SW for bug-gnu-emacs@gnu.org; Sun, 08 Mar 2020 05:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Pieter van Oostrum Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 08 Mar 2020 09:35:01 +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.15836600696105 (code B ref 39962); Sun, 08 Mar 2020 09:35:01 +0000 Original-Received: (at 39962) by debbugs.gnu.org; 8 Mar 2020 09:34:29 +0000 Original-Received: from localhost ([127.0.0.1]:47909 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jAsKL-0001aP-F8 for submit@debbugs.gnu.org; Sun, 08 Mar 2020 05:34:29 -0400 Original-Received: from [145.132.212.31] (port=58594 helo=cochabamba.vanoostrum.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jAsKJ-0001aD-3T for 39962@debbugs.gnu.org; Sun, 08 Mar 2020 05:34:27 -0400 Original-Received: from cochabamba.vanoostrum.org (localhost [IPv6:::1]) by cochabamba.vanoostrum.org (Postfix) with ESMTP id 29C26AA8B357; Sun, 8 Mar 2020 10:34:21 +0100 (CET) In-Reply-To: <329e58b1-6255-311e-bdd8-b6f5b3d5208f@cs.ucla.edu> (Paul Eggert's message of "Sat, 7 Mar 2020 23:42:51 -0800") 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:177046 Archived-At: Paul Eggert writes: >> 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? Sorry, I got that i686 stuff from a compile script I picked up somewhere. I'll try to recompile without that. But, Emacs is still a 64-bit executable: The file command gives: Emacs: Mach-O 64-bit x86_64 executable, flags: > What compiler and version are you using? And what GDB version are you > using? gcc -v Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 9.1.0 (clang-902.0.39.2) Target: x86_64-apple-darwin17.7.0 Thread model: posix InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin gdb version 9.1_0 with python3.7 > >> (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. > Here is that output. (gdb) xgetsym $25 (gdb) p $ptr $31 = (struct Lisp_Symbol *) 0x3af8 (gdb) xgetptr $25 (gdb) p/x $ptr $32 = 0x3960 (gdb) p ((struct Lisp_Symbol *) ((char *)lispsym + 0x3960)) $33 = (struct Lisp_Symbol *) 0x3af8 (gdb) p (char *)lispsym $34 = 0x198 (gdb) p (char *)&lispsym[0] 'lispsym' has unknown type; cast it to its declared type (gdb) So I guess your patch might not help. Or is it worthwhile to try anyway? But anyway, to use that patch, I have to create a new instance of the crash. And then, I also will recompile first. -- Pieter van Oostrum www: http://pieter.vanoostrum.org/ PGP key: [8DAE142BE17999C4]