bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#39962: 27.0.90; Crash in Emacs 27.0.90


From: Pieter van Oostrum
Subject: bug#39962: 27.0.90; Crash in Emacs 27.0.90
Date: Sun, 08 Mar 2020 10:34:20 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.90 (darwin)

Paul Eggert <eggert@cs.ucla.edu> 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:<NOUNDEFS|DYLDLINK|TWOLEVEL|PIE>

> 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 <lispsym+14688>
>
> 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 <lispsym+14688>
>
> 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 <lispsym+14688>
>
> I assume yours will output something like "$29 = (struct Lisp_Symbol *)
> 0x3af8" instead. If so, please try this:
>
> (gdb) p (char *)lispsym
> $30 = 0x104dc90 <lispsym> "\230\001"
> (gdb) p (char *)&lispsym[0]
> $31 = 0x104dc90 <lispsym> "\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 <error: Cannot access memory at address 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]





reply via email to

[Prev in Thread] Current Thread [Next in Thread]