rtld-elf - restore old tls/tcb code
authorAlex Hornung <ahornung@gmail.com>
Sun, 24 Jul 2011 13:45:50 +0000 (14:45 +0100)
committerAlex Hornung <ahornung@gmail.com>
Sun, 24 Jul 2011 13:52:20 +0000 (14:52 +0100)
commit18d39a4f89a4c485af1b89815f4e63988532be5e
tree3baa0db154a969e1c97ff05f19273e20047e8752
parentebe4c2aed5905a679fc6d17112e471f23bb804af
rtld-elf - restore old tls/tcb code

 * This was ported incorrectly from FreBSD; the dtv in the TCB needs to
   be updated properly.

 * This fixes a fairly tricky issue that appears in threaded programs
   using dlopen() and family, such as php and Java. It presented itself
   as a strcmp segfault in object_match_name() due to a messed up STAILQ
   ->next pointer. The pointer was being messed up by the TLS code.

Reported-by: Peter Avalos, Antonio Huete, Francois Tigeot
libexec/rtld-elf/i386/reloc.c
libexec/rtld-elf/rtld.c
libexec/rtld-elf/x86_64/reloc.c