DragonFly BSD
DragonFly commits List (threaded) for 2013-06
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: rtld: increase TLS storage space (bug 2566)


From: John Marino <marino@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 11 Jun 2013 04:55:31 -0700 (PDT)

commit 4b2454d14575fe90aff242d1b282429ae99e2fea
Author: John Marino <draco@marino.st>
Date:   Tue Jun 11 13:11:21 2013 +0200

    rtld: increase TLS storage space (bug 2566)
    
    It appears that the TLS storage space, which is currently defined as 256
    bytes on both platforms, is insufficient to handle libc TLS data.
    Due to nmalloc setting of the thr_mags structure as Thread Local Storage,
    the TLS elf section of x86-64 libc is 1172 bytes, while the i386 libc TLS
    section weighs in at 588 bytes.  For comparison, the FreeBSD libc TLS
    section is 17 bytes, and FreeBSD rtld only reserves 128 bytes for TLS.
    
    The requirements for dmalloc are more modest, so this shortfall was likely
    an unintended side-effect of switching from dmalloc back to nmalloc.
    
    This commit sets the reserved TLS space to 1280 bytes for x86-64 and 640
    bytes for i386.  This should allow 3.4 packages to continue to work on
    the latest 3.5 branch as long as libc.so.7 is present.  For world upgrades
    this is the normal case, but the libraries can be obtained by installing
    misc/compat34x from dports as well.
    
    Even if the libc TLS space requirements drop significantly, the large
    RTLD_STATIC_TLS_EXTRA value needs to be maintained as long as
    compatibility with old libc (3.4 and earlier) libraries is required.

Summary of changes:
 sys/cpu/i386/include/tls.h   | 2 +-
 sys/cpu/x86_64/include/tls.h | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/4b2454d14575fe90aff242d1b282429ae99e2fea


-- 
DragonFly BSD source repository



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