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 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 GCC 4.8.3 with -O2 -g3 generates: 0x0000000000520e0d <+573>: callq 0x5407e0 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 With an attached patch, clang generates: 0x0000000000531c01 <+689>: callq 0x551560 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 I.e. with a displacement to %rsi. OK to install? Dmitry