aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/nptl
diff options
context:
space:
mode:
authorCarlos O'Donell <carlos@systemhalted.org>2018-01-24 20:35:22 -0800
committerCarlos O'Donell <carlos@systemhalted.org>2018-01-25 23:43:46 -0800
commit2ec0e7eade0ea1258acd5c6f5e5e9bfaeb5041a8 (patch)
tree9d069618e0132fa31ab0c39eda4c95f14d50a1b0 /sysdeps/nptl
parent47c4b4b060db0290022dcc37cab7b5ff4bdb5c32 (diff)
downloadglibc-2ec0e7eade0ea1258acd5c6f5e5e9bfaeb5041a8.zip
glibc-2ec0e7eade0ea1258acd5c6f5e5e9bfaeb5041a8.tar.gz
glibc-2ec0e7eade0ea1258acd5c6f5e5e9bfaeb5041a8.tar.bz2
Revert Intel CET changes to __jmp_buf_tag (Bug 22743)
In commit cba595c350e52194e10c0006732e1991e3d0803b and commit f81ddabffd76ac9dd600b02adbf3e1dac4bb10ec, ABI compatibility with applications was broken by increasing the size of the on-stack allocated __pthread_unwind_buf_t beyond the oringal size. Applications only have the origianl space available for __pthread_unwind_register, and __pthread_unwind_next to use, any increase in the size of __pthread_unwind_buf_t causes these functions to write beyond the original structure into other on-stack variables leading to segmentation faults in common applications like vlc. The only workaround is to version those functions which operate on the old sized objects, but this must happen in glibc 2.28. Thank you to Andrew Senkevich, H.J. Lu, and Aurelien Jarno, for submitting reports and tracking the issue down. The commit reverts the above mentioned commits and testing on x86_64 shows that the ABI compatibility is restored. A tst-cleanup1 regression test linked with an older glibc now passes when run with the newly built glibc. Previously a tst-cleanup1 linked with an older glibc would segfault when run with an affected glibc build. Tested on x86_64 with no regressions. Signed-off-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'sysdeps/nptl')
-rw-r--r--sysdeps/nptl/pthread.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/sysdeps/nptl/pthread.h b/sysdeps/nptl/pthread.h
index c8ba5a7..df049ab 100644
--- a/sysdeps/nptl/pthread.h
+++ b/sysdeps/nptl/pthread.h
@@ -27,7 +27,6 @@
#include <bits/setjmp.h>
#include <bits/wordsize.h>
#include <bits/types/struct_timespec.h>
-#include <bits/types/__cancel_jmp_buf_tag.h>
/* Detach state. */
@@ -524,7 +523,11 @@ extern void pthread_testcancel (void);
typedef struct
{
- struct __cancel_jmp_buf_tag __cancel_jmp_buf[1];
+ struct
+ {
+ __jmp_buf __cancel_jmp_buf;
+ int __mask_was_saved;
+ } __cancel_jmp_buf[1];
void *__pad[4];
} __pthread_unwind_buf_t __attribute__ ((__aligned__));