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

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

bug#16986: Fw: Re: Crash when idle


From: Dmitry Antipov
Subject: bug#16986: Fw: Re: Crash when idle
Date: Fri, 01 Aug 2014 12:17:31 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0

On 07/23/2014 02:09 PM, YAMAMOTO Mitsuharu wrote:

I suspect there are no direct references to the value of `directory'
from stack contents or register values, and thus GC triggered by the
above DECODE_FILE has collected the value of `directory' as a garbage.
If that is the case, %rax at <+730> (i.e., &XSTRING(directory)->data)
would become invalid.

Nice shot.

Clang 3.4 with -O2 -g3 generates:

0x0000000000531c21 <+721>:      callq  0x551570 <make_uninit_multibyte_string>
0x0000000000531c26 <+726>:      mov    %rax,%rbp
0x0000000000531c29 <+729>:      mov    0x17(%rbp),%rdi
0x0000000000531c2d <+733>:      mov    0x28(%rsp),%rax
0x0000000000531c32 <+738>:      mov    (%rax),%rsi
0x0000000000531c35 <+741>:      mov    0x38(%rsp),%rdx
0x0000000000531c3a <+746>:      callq  0x413050 <address@hidden>

GCC 4.8.3 with -O2 -g3 generates:

0x0000000000520e0d <+573>:      callq  0x5407e0 <make_uninit_multibyte_string>
0x0000000000520e12 <+578>:      mov    0x38(%rsp),%rsi
0x0000000000520e17 <+583>:      lea    -0x1(%rax),%r15
0x0000000000520e1b <+587>:      mov    0x20(%rsp),%rdx
0x0000000000520e20 <+592>:      mov    0x18(%r15),%rdi
0x0000000000520e24 <+596>:      mov    %rax,%rbx
0x0000000000520e27 <+599>:      mov    0x18(%rsi),%rsi
0x0000000000520e2b <+603>:      callq  0x413270 <address@hidden>

With an attached patch, clang generates:

0x0000000000531c01 <+689>:      callq  0x551560 <make_uninit_multibyte_string>
0x0000000000531c06 <+694>:      mov    0x17(%rax),%rdi
0x0000000000531c0a <+698>:      mov    %rax,%rbp
0x0000000000531c0d <+701>:      mov    0x68(%rsp),%rax
0x0000000000531c12 <+706>:      mov    0x17(%rax),%rsi
0x0000000000531c16 <+710>:      mov    0x50(%rsp),%rdx
0x0000000000531c1b <+715>:      callq  0x413050 <address@hidden>

I.e. with a displacement to %rsi.  OK to install?

Dmitry

Attachment: bug16986.patch
Description: Text Data


reply via email to

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