Disabling lazy binding reduces stack usage during unwinding.
Note that RTLD_NOW only makes a difference if libgcc.so has not
already been loaded, so this is only a partial fix.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
(cherry picked from commit
f993b8754080ac7572b692870e926d8b493db16c)
+2018-01-10 Florian Weimer <fweimer@redhat.com>
+
+ [BZ #22636]
+ * sysdeps/nptl/unwind-forcedunwind.c (pthread_cancel_init): Open
+ libgcc.so with RTLD_NOW, to avoid lazy binding during unwind.
+
2018-01-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
[BZ #22637]
[21609] x86-64: Align the stack in __tls_get_addr
[21624] Unsafe alloca allows local attackers to alias stack and heap (CVE-2017-1000366)
[21654] nss: Fix invalid cast in group merging
+ [22636] PTHREAD_STACK_MIN is too small on x86-64
[22637] nptl: Fix stack guard size accounting
[22644] string: memmove-sse2-unaligned on 32bit x86 produces garbage when
crossing 2GB threshold (CVE-2017-18269)
return;
}
- handle = __libc_dlopen (LIBGCC_S_SO);
+ handle = __libc_dlopen_mode (LIBGCC_S_SO, RTLD_NOW | __RTLD_DLOPEN);
if (handle == NULL
|| (resume = __libc_dlsym (handle, "_Unwind_Resume")) == NULL