NetBSD-Bugs archive

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

Re: lib/48324: ld.elf_so - tty.c memcpy overwrites tcb for tls variant 2



The following reply was made to PR lib/48324; it has been noted by GNATS.

From: Nat Sloss <nathanialsloss%yahoo.com.au@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: Nick Hudson <nick.hudson%gmx.co.uk@localhost>
Subject: Re: lib/48324: ld.elf_so - tty.c memcpy overwrites tcb for tls variant 
2
Date: Sun, 20 Oct 2013 12:04:34 +1100

 Hi,
 
 I think that even if I was to call tls_offset_allocate the tls module wont 
 load.
 
 Due to this in tls.c _ttld_tls_offset_allocate:
 
  
        if (_rtld_tls_static_space) {
                if (obj->tlsinitsize) {
                        _rtld_error("%s: Use of initialized "
                            "Thread Local Storage with model initial-exec "
                            "and dlopen is not supported",
                            obj->path);
                        return -1;
                }
 
 I know from gdb that the _rtkd_tls_static_space has a value of 0x40 and 
 obj->tlssize = 0x6c.  So it would return an error and not set the offset.
 
 I am not sure if my package will run correctly is there any way I could load 
 mpfr earlier so it would be initialised in the first call to 
 _rtld_tls_offset_allocate maybe using RTLD_NOW or I can just use the package 
 having built mpfr without TLS support.
 
 Regards,
 
 Nat.
 


Home | Main Index | Thread Index | Old Index