about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--NEWS12
-rw-r--r--nptl/Makefile4
-rw-r--r--nptl/pthreadP.h11
4 files changed, 28 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index fae6a3052b..91c963200a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2015-07-09  Martin Sebor  <msebor@redhat.com>
+
+	[BZ #18435]
+	* nptl/pthreadP.h (pthread_cleanup_push, pthread_cleanup_pop):
+	Revert commit ed225df3ad9cbac3c22ec3f0fbbed1f9c61d1c54.
+	* nptl/Makefile (test-xfail-tst-once5): Define.
+
 2015-07-09  Roland McGrath  <roland@hack.frob.com>
 
 	* include/stdio.h: Add rtld_hidden_proto (__libc_fatal).
diff --git a/NEWS b/NEWS
index dda1085d63..2cfc43e16a 100644
--- a/NEWS
+++ b/NEWS
@@ -22,12 +22,12 @@ Version 2.22
   18128, 18138, 18185, 18196, 18197, 18206, 18210, 18211, 18217, 18219,
   18220, 18221, 18234, 18244, 18245, 18247, 18287, 18319, 18324, 18333,
   18346, 18371, 18383, 18397, 18400, 18409, 18410, 18412, 18134, 18418,
-  18422, 18434, 18435, 18444, 18468, 18469, 18470, 18479, 18483, 18495,
-  18496, 18497, 18498, 18502, 18507, 18508, 18512, 18513, 18519, 18520,
-  18522, 18527, 18528, 18529, 18530, 18532, 18533, 18534, 18536, 18539,
-  18540, 18542, 18544, 18545, 18546, 18547, 18549, 18553, 18557, 18558,
-  18569, 18583, 18585, 18586, 18592, 18593, 18594, 18602, 18612, 18613,
-  18619, 18633, 18641, 18643, 18648.
+  18422, 18434, 18444, 18468, 18469, 18470, 18479, 18483, 18495, 18496,
+  18497, 18498, 18502, 18507, 18508, 18512, 18513, 18519, 18520, 18522,
+  18527, 18528, 18529, 18530, 18532, 18533, 18534, 18536, 18539, 18540,
+  18542, 18544, 18545, 18546, 18547, 18549, 18553, 18557, 18558, 18569,
+  18583, 18585, 18586, 18592, 18593, 18594, 18602, 18612, 18613, 18619,
+  18633, 18641, 18643, 18648.
 
 * Cache information can be queried via sysconf() function on s390 e.g. with
   _SC_LEVEL1_ICACHE_SIZE as argument.
diff --git a/nptl/Makefile b/nptl/Makefile
index 4544aa2947..5bc4ad1d22 100644
--- a/nptl/Makefile
+++ b/nptl/Makefile
@@ -288,6 +288,10 @@ xtests = tst-setuid1 tst-setuid1-static tst-setuid2 \
 	tst-mutexpp1 tst-mutexpp6 tst-mutexpp10
 test-srcs = tst-oddstacklimit
 
+# Test expected to fail on most targets (except x86_64) due to bug
+# 18435 - pthread_once hangs when init routine throws an exception.
+test-xfail-tst-once5 = yes
+
 # Files which must not be linked with libpthread.
 tests-nolibpthread = tst-unload
 
diff --git a/nptl/pthreadP.h b/nptl/pthreadP.h
index 72d3e23b95..8cd51c65ad 100644
--- a/nptl/pthreadP.h
+++ b/nptl/pthreadP.h
@@ -537,8 +537,19 @@ extern void __pthread_cleanup_push (struct _pthread_cleanup_buffer *buffer,
 				    void (*routine) (void *), void *arg)
      attribute_hidden;
 
+/* Replace cleanup macros defined in <pthread.h> with internal
+   versions that don't depend on unwind info and better support
+   cancellation.  */
+# undef pthread_cleanup_push
+# define pthread_cleanup_push(routine,arg)              \
+  { struct _pthread_cleanup_buffer _buffer;             \
+  __pthread_cleanup_push (&_buffer, (routine), (arg));
+
 extern void __pthread_cleanup_pop (struct _pthread_cleanup_buffer *buffer,
 				   int execute) attribute_hidden;
+# undef pthread_cleanup_pop
+# define pthread_cleanup_pop(execute)                   \
+  __pthread_cleanup_pop (&_buffer, (execute)); }
 #endif
 
 extern void __pthread_cleanup_push_defer (struct _pthread_cleanup_buffer *buffer,