This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libc/11214] invalid opcode in ld.so


------- Additional Comments From hjl dot tools at gmail dot com  2010-01-26 23:40 -------
_dl_x86_64_save_sse was never called. However, sometimes
_dl_x86_64_restore_sse is called via

gdb) bt
#0  _dl_check_restore (avx=622750216) at ../sysdeps/x86_64/dl-check.c:18
#1  0x00007f1924fe4a3b in _dl_x86_64_restore_sse ()
    at ../sysdeps/x86_64/dl-trampoline.S:222
#2  0x00007f1924fde315 in _dl_fixup (l=<value optimized out>, 
    reloc_arg=<value optimized out>) at ../elf/dl-runtime.c:126
#3  0x00007f1924fe43c5 in _dl_runtime_resolve ()
    at ../sysdeps/x86_64/dl-trampoline.S:41
#4  0x0000000000410f63 in linux_tracefork_child (arg=0x7f19251e8000)
    at /export/gnu/import/git/gdb/gdb/gdbserver/linux-low.c:2587
#5  0x00007f1924b3524d in clone ()
    at ../sysdeps/unix/sysv/linux/x86_64/clone.S:115
(gdb) 

gdb uses

  child_pid = clone (linux_tracefork_child, stack + STACK_SIZE,
                     CLONE_VM | SIGCHLD, stack + STACK_SIZE * 2);


static int
linux_tracefork_child (void *arg)
{
  ptrace (PTRACE_TRACEME, 0, 0, 0);
  kill (getpid (), SIGSTOP);
  clone (linux_tracefork_grandchild, arg + STACK_SIZE,
         CLONE_VM | SIGCHLD, NULL);
  exit (0);
}

Since 2 processes share the TLS and memory space, there is
a race condition. Maybe gdb shouldn't use CLONE_VM for x86-64
or use "-z now" for linking.


-- 


http://sourceware.org/bugzilla/show_bug.cgi?id=11214

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]