[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r8324 - in /fsf/trunk/libc: ChangeLog elf/dl-open.c
- To: commits@xxxxxxxxxx
- Subject: [commits] r8324 - in /fsf/trunk/libc: ChangeLog elf/dl-open.c
- From: eglibc@xxxxxxxxxx
- Date: Mon, 20 Apr 2009 07:05:25 -0000
Author: eglibc
Date: Mon Apr 20 00:05:24 2009
New Revision: 8324
Log:
Import glibc-mainline for 2009-04-20
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/elf/dl-open.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Mon Apr 20 00:05:24 2009
@@ -1,3 +1,10 @@
+2009-04-19 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ [BZ #10069]
+ * elf/dl-open.c (dl_open_worker): We cannot guarantee that we can load
+ an object that uses static TLS if the TLS modid is higher than the
+ reserve we always allocate. At least for multi-threaded code.
+
2009-04-18 Ulrich Drepper <drepper@xxxxxxxxxx>
* stdlib/strfmon_l.c (__vstrfmon_l): Don't wrap when computing width.
Modified: fsf/trunk/libc/elf/dl-open.c
==============================================================================
--- fsf/trunk/libc/elf/dl-open.c (original)
+++ fsf/trunk/libc/elf/dl-open.c Mon Apr 20 00:05:24 2009
@@ -490,6 +490,18 @@
if (imap->l_need_tls_init)
{
+ /* For static TLS we have to allocate the memory here
+ and now. This includes allocating memory in the DTV.
+ But we cannot change any DTV other than our own. So,
+ if we cannot guarantee that there is room in the DTV
+ we don't even try it and fail the load.
+
+ XXX We could track the minimum DTV slots allocated in
+ all threads. */
+ if (! RTLD_SINGLE_THREAD_P && imap->l_tls_modid > DTV_SURPLUS)
+ _dl_signal_error (0, "dlopen", NULL, N_("\
+cannot load any more object with static TLS"));
+
imap->l_need_tls_init = 0;
#ifdef SHARED
/* Update the slot information data for at least the