2ec0e7eade
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>
28 lines
1.1 KiB
Plaintext
28 lines
1.1 KiB
Plaintext
#include <sysdep.h>
|
|
#include <tls.h>
|
|
#include <kernel-features.h>
|
|
|
|
RESULT offsetof (struct pthread, result)
|
|
TID offsetof (struct pthread, tid)
|
|
CANCELHANDLING offsetof (struct pthread, cancelhandling)
|
|
CLEANUP_JMP_BUF offsetof (struct pthread, cleanup_jmp_buf)
|
|
CLEANUP offsetof (struct pthread, cleanup)
|
|
CLEANUP_PREV offsetof (struct _pthread_cleanup_buffer, __prev)
|
|
MUTEX_FUTEX offsetof (pthread_mutex_t, __data.__lock)
|
|
MULTIPLE_THREADS_OFFSET offsetof (tcbhead_t, multiple_threads)
|
|
POINTER_GUARD offsetof (tcbhead_t, pointer_guard)
|
|
VGETCPU_CACHE_OFFSET offsetof (tcbhead_t, vgetcpu_cache)
|
|
#ifndef __ASSUME_PRIVATE_FUTEX
|
|
PRIVATE_FUTEX offsetof (tcbhead_t, private_futex)
|
|
#endif
|
|
|
|
-- Not strictly offsets, but these values are also used in the TCB.
|
|
TCB_CANCELSTATE_BITMASK CANCELSTATE_BITMASK
|
|
TCB_CANCELTYPE_BITMASK CANCELTYPE_BITMASK
|
|
TCB_CANCELING_BITMASK CANCELING_BITMASK
|
|
TCB_CANCELED_BITMASK CANCELED_BITMASK
|
|
TCB_EXITING_BITMASK EXITING_BITMASK
|
|
TCB_CANCEL_RESTMASK CANCEL_RESTMASK
|
|
TCB_TERMINATED_BITMASK TERMINATED_BITMASK
|
|
TCB_PTHREAD_CANCELED PTHREAD_CANCELED
|