This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
dl_close: wrong calculation of tls_free_end ?
- From: "Carmelo Amoroso" <carmelo73 at gmail dot com>
- To: libc-alpha at gnu dot org
- Date: Thu, 10 Aug 2006 15:19:38 +0200
- Subject: dl_close: wrong calculation of tls_free_end ?
Hi All,
I'm involved into the nptl port for uClibc over SuperH, and I'm having
a look into the glibc (2.4) code of _dl_close .
It seems to me that the calculation of the tls_free_end is wrong (case
of TLS_DTV_AT_TP).
I think that to correclty extend the contiguous chunk the
tls_blocksize of the module should be be added to the current
tls_free_end instead of subtracted.
I checked the CVS and found that it was changed in version 1.98.
Unfortunately I don't have a test exploting this suspected bug.
This is an extract of the code I'm referring to
# elif TLS_DTV_AT_TP
if ((size_t) imap->l_tls_offset == tls_free_end)
/* Extend the contiguous chunk being reclaimed. */
tls_free_end -= imap->l_tls_blocksize;