[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commits] r25008 - in /fsf/trunk/libc: NEWS nptl/ChangeLog nptl/tst-tls7.c nptl/tst-tls7mod.c
- To: commits@xxxxxxxxxx
- Subject: [Commits] r25008 - in /fsf/trunk/libc: NEWS nptl/ChangeLog nptl/tst-tls7.c nptl/tst-tls7mod.c
- From: eglibc@xxxxxxxxxx
- Date: Sun, 12 Jan 2014 08:01:52 -0000
Author: eglibc
Date: Sun Jan 12 00:01:51 2014
New Revision: 25008
Log:
Import glibc-mainline for 2014-01-12
Modified:
fsf/trunk/libc/NEWS
fsf/trunk/libc/nptl/ChangeLog
fsf/trunk/libc/nptl/tst-tls7.c
fsf/trunk/libc/nptl/tst-tls7mod.c
Modified: fsf/trunk/libc/NEWS
==============================================================================
--- fsf/trunk/libc/NEWS (original)
+++ fsf/trunk/libc/NEWS Sun Jan 12 00:01:51 2014
@@ -17,14 +17,15 @@
15532, 15593, 15601, 15608, 15609, 15610, 15632, 15640, 15670, 15672,
15680, 15681, 15723, 15734, 15735, 15736, 15748, 15749, 15754, 15760,
15763, 15764, 15797, 15799, 15825, 15843, 15844, 15846, 15847, 15849,
- 15855, 15856, 15857, 15859, 15867, 15886, 15887, 15890, 15892, 15893,
- 15895, 15897, 15901, 15905, 15909, 15915, 15917, 15919, 15921, 15923,
- 15939, 15941, 15948, 15963, 15966, 15985, 15988, 15997, 16032, 16034,
- 16036, 16037, 16038, 16041, 16055, 16071, 16072, 16074, 16077, 16078,
- 16103, 16112, 16143, 16144, 16146, 16150, 16151, 16153, 16167, 16172,
- 16195, 16214, 16245, 16271, 16274, 16283, 16289, 16293, 16314, 16316,
- 16330, 16337, 16338, 16356, 16365, 16366, 16369, 16372, 16375, 16379,
- 16384, 16385, 16386, 16387, 16390, 16394, 16400, 16407, 16408, 16414.
+ 15850, 15855, 15856, 15857, 15859, 15867, 15886, 15887, 15890, 15892,
+ 15893, 15895, 15897, 15901, 15905, 15909, 15915, 15917, 15919, 15921,
+ 15923, 15939, 15941, 15948, 15963, 15966, 15985, 15988, 15997, 16032,
+ 16034, 16036, 16037, 16038, 16041, 16055, 16071, 16072, 16074, 16077,
+ 16078, 16103, 16112, 16133, 16143, 16144, 16146, 16150, 16151, 16153,
+ 16167, 16172, 16195, 16214, 16245, 16271, 16274, 16283, 16289, 16293,
+ 16314, 16316, 16330, 16337, 16338, 16356, 16365, 16366, 16369, 16372,
+ 16375, 16379, 16384, 16385, 16386, 16387, 16390, 16394, 16400, 16407,
+ 16408, 16414.
* Slovenian translations for glibc messages have been contributed by the
Translation Project's Slovenian team of translators.
Modified: fsf/trunk/libc/nptl/ChangeLog
==============================================================================
--- fsf/trunk/libc/nptl/ChangeLog (original)
+++ fsf/trunk/libc/nptl/ChangeLog Sun Jan 12 00:01:51 2014
@@ -1,3 +1,9 @@
+2014-01-11 Paul Pluzhnikov <ppluzhnikov@xxxxxxxxxx>
+
+ * tst-tls7.c (action): New function.
+ (do_test): Call it.
+ * tst-tls7mod.c (action): Move sem_post to caller.
+
2014-01-03 Andrew Hunter <ahh@xxxxxxxxxx>
* nptl/Makefile (tst-tls7): New test.
Modified: fsf/trunk/libc/nptl/tst-tls7.c
==============================================================================
--- fsf/trunk/libc/nptl/tst-tls7.c (original)
+++ fsf/trunk/libc/nptl/tst-tls7.c Sun Jan 12 00:01:51 2014
@@ -19,6 +19,8 @@
/* This test checks that TLS in a dlopened object works when first accessed
from a signal handler. */
+#include <assert.h>
+#include <atomic.h>
#include <dlfcn.h>
#include <pthread.h>
#include <semaphore.h>
@@ -37,6 +39,23 @@
/* never reached */
return NULL;
+}
+
+static void (*tls7mod_action) (int, siginfo_t *, void *);
+
+static void
+action (int signo, siginfo_t *info, void *ignored)
+{
+ sem_t *sem = info->si_value.sival_ptr;
+
+ atomic_read_barrier ();
+ assert (tls7mod_action != NULL);
+ (*tls7mod_action) (signo, info, ignored);
+
+ /* This sem_post may trigger dlclose, which will invalidate tls7mod_action.
+ It is important to do that only after tls7mod_action is no longer
+ active. */
+ sem_post (sem);
}
int
@@ -63,12 +82,13 @@
exit (1);
}
- void (*action) (int, siginfo_t *, void *) = dlsym (h, "action");
- if (action == NULL)
+ tls7mod_action = dlsym (h, "action");
+ if (tls7mod_action == NULL)
{
puts ("dlsym for action failed");
exit (1);
}
+ atomic_write_barrier ();
struct sigaction sa;
sa.sa_sigaction = action;
@@ -105,6 +125,9 @@
}
}
+ /* Paranoia. */
+ tls7mod_action = NULL;
+
if (dlclose (h))
{
puts ("dlclose failed");
Modified: fsf/trunk/libc/nptl/tst-tls7mod.c
==============================================================================
--- fsf/trunk/libc/nptl/tst-tls7mod.c (original)
+++ fsf/trunk/libc/nptl/tst-tls7mod.c Sun Jan 12 00:01:51 2014
@@ -29,7 +29,6 @@
void
action (int signo, siginfo_t *info, void *ignored)
{
- sem_t *sem = info->si_value.sival_ptr;
if (tls_data != 0xdeadbeef)
{
write (STDOUT_FILENO, "wrong TLS value\n", 17);
@@ -38,6 +37,4 @@
/* arbitrary choice, just write something unique-ish. */
tls_data = (intptr_t) info;
-
- sem_post (sem);
}
_______________________________________________
Commits mailing list
Commits@xxxxxxxxxx
http://eglibc.org/cgi-bin/mailman/listinfo/commits