glibc/sysdeps/generic
Florian Weimer a509eb117f Avoid late dlopen failure due to scope, TLS slotinfo updates [BZ #25112]
This change splits the scope and TLS slotinfo updates in dlopen into
two parts: one to resize the data structures, and one to actually apply
the update.  The call to add_to_global_resize in dl_open_worker is moved
before the demarcation point at which no further memory allocations are
allowed.

_dl_add_to_slotinfo is adjusted to make the list update optional.  There
is some optimization possibility here because we could grow the slotinfo
list of arrays in a single call, one the largest TLS modid is known.

This commit does not fix the fatal meory allocation failure in
_dl_update_slotinfo.  Ideally, this error during dlopen should be
recoverable.

The update order of scopes and TLS data structures is retained, although
it appears to be more correct to fully initialize TLS first, and then
expose symbols in the newly loaded objects via the scope update.

Tested on x86_64-linux-gnu.

Change-Id: I240c58387dabda3ca1bcab48b02115175fa83d6c
2019-11-27 20:55:35 +01:00
..
net Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
netinet Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
nfs Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
sys Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
_G_config.h Post-cleanup 2: minimize _G_config.h. 2018-02-07 10:10:32 -05:00
_itoa.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
a.out.h
abort-instr.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
adaptive_spin_count.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
aio_misc.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
allocalim.h Update. 2002-10-09 09:42:48 +00:00
asm-syntax.h
atomic-machine.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
c++-types.data Add placeholder c++-types.data and *.abilist files. 2015-02-13 15:41:34 -08:00
confstr.h
device-nrs.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
dirstream.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
dl-cache.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
dl-dtprocnum.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
dl-dtv.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
dl-fcntl.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
dl-fileid.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
dl-fptr.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
dl-hash.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
dl-irel.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
dl-librecon.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
dl-lookupcfg.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
dl-machine.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
dl-mman.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
dl-osinfo.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
dl-procinfo.c Dummy dl-procinfo.c file for platforms which don't have one. 2002-02-01 18:25:44 +00:00
dl-procinfo.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
dl-procruntime.c ld.so: Add architecture specific fields 2017-11-13 08:02:52 -08:00
dl-prop.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
dl-sysdep.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
dl-tls.h Update. 2002-02-07 04:08:19 +00:00
dl-unistd.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
dwarf2.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
elide.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
eloop-threshold.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
entry.h Update. 2002-03-15 03:16:52 +00:00
errqueue.h
exit-thread.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
fd_to_filename.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
fenv_private.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
fips-private.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
fix-fp-int-compare-invalid.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
fix-fp-int-convert-overflow.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
fix-int-fp-convert-zero.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
float128-abi.h Move some float128 symbol version definitions. 2017-10-16 22:04:42 +00:00
fork.h Update. 2002-10-01 00:05:23 +00:00
fpu_control.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
framestate.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
gcc-compat.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
gccframe.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
get-rounding-mode.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
gmp-mparam.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
hp-timing-common.h Fix small error in HP_TIMING_PRINT trailing null char setting 2019-09-17 17:50:11 +08:00
hp-timing.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
ifreq.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
ifunc-init.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
ifunc-sel.h Do not stack-protect ifunc resolvers [BZ #7065] 2016-12-26 10:08:41 +01:00
internal-signals.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
intr-msg.h
ld.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
ldbl-classify-compat.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
ldconfig.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
ldsodefs.h Avoid late dlopen failure due to scope, TLS slotinfo updates [BZ #25112] 2019-11-27 20:55:35 +01:00
libanl.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libBrokenLocale.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libc-lock.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
libc-mmap.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
libc-start.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
libc-tsd.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
libc.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libcrypt.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libdl.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libm-alias-double.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
libm-alias-float128.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
libm-alias-float.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
libm-alias-ldouble.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
libm-test-ulps Replace gen-libm-test.pl with gen-libm-test.py. 2018-08-09 15:34:12 +00:00
libm-test-ulps-name Do not hardcode platform names in manual/libm-err-tab.pl (bug 14139). 2016-11-04 16:49:06 +00:00
libm.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libnsl.abilist Add placeholder libnsl.abilist and libutil.abilist files 2016-03-07 00:49:36 +01:00
libnss_compat.abilist Add missed zero length files in previous abilist commit. 2012-04-28 15:38:24 -04:00
libnss_db.abilist Add missed zero length files in previous abilist commit. 2012-04-28 15:38:24 -04:00
libnss_dns.abilist Add missed zero length files in previous abilist commit. 2012-04-28 15:38:24 -04:00
libnss_files.abilist Add missed zero length files in previous abilist commit. 2012-04-28 15:38:24 -04:00
libnss_hesiod.abilist Add missed zero length files in previous abilist commit. 2012-04-28 15:38:24 -04:00
libnss_nis.abilist Add missed zero length files in previous abilist commit. 2012-04-28 15:38:24 -04:00
libnss_nisplus.abilist Add missed zero length files in previous abilist commit. 2012-04-28 15:38:24 -04:00
libpthread.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libresolv.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
librt.abilist Simplify the abilist format 2015-11-06 13:58:53 +01:00
libutil.abilist Add placeholder libnsl.abilist and libutil.abilist files 2016-03-07 00:49:36 +01:00
link_map.h ld.so: Add architecture specific fields 2017-11-13 08:02:52 -08:00
linkmap.h Rename bits/linkmap.h to linkmap.h (bug 14912). 2015-09-04 19:44:27 +00:00
local-setxid.h * sysdeps/posix/spawni.c (__spawni): Use local_seteuid and 2006-06-04 22:17:06 +00:00
localplt.data ld.so: Introduce struct dl_exception 2017-08-10 16:54:57 +02:00
machine-gmon.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
machine-lock.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
machine-sp.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
Makefile Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
malloc-alignment.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
malloc-machine.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
malloc-sysdep.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
math_ldbl_opt.h Use PRINTF_LDBL_IS_DBL instead of __ldbl_is_dbl. 2018-12-05 18:15:43 -02:00
math_ldbl.h Allow direct use of math_ldbl.h in testsuite. 2017-02-25 10:40:48 -05:00
math_private_calls.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
math_private.h Enable inlining issignalingf within glibc 2019-11-21 09:39:48 -06:00
math-barriers.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
math-nan-payload-double.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
math-nan-payload-float.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
math-tests-arch.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
math-tests-exceptions.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
math-tests-rounding.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
math-tests-snan-cast.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
math-tests-snan-payload.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
math-tests-snan.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
math-tests-trap-force.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
math-tests-trap.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
math-tests.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
math-type-macros-double.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
math-type-macros-float128.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
math-type-macros-float.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
math-type-macros-ldouble.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
math-type-macros.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
memcopy.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
memusage.h Change most internal uses of __gettimeofday to __clock_gettime. 2019-10-30 17:04:10 -03:00
mmap_info.h posix: Fix large mmap64 offset for mips64n32 (BZ#24699) 2019-07-10 16:52:50 -03:00
nan-high-order-bit.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
not-cancel.h Remove pause and nanosleep not cancel wrappers 2019-10-31 11:09:06 -03:00
not-errno.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
nscd-types.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
pagecopy.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
paths.h generic paths.h: remove old paths from _PATH_STDPATH 2012-11-04 10:11:39 +01:00
profil-counter.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
pty-private.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
register-dump.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
rtld-lowlevel.h Jakub Jelinek <jakub@redhat.com> 2006-10-10 00:51:29 +00:00
safe-fatal.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
setjmpP.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
sigcontextinfo.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
siglist.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
sigset-cvt-mask.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
sigsetops.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
single-thread.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
stackguard-macros.h BZ #15754: Fix test case for ARM. 2013-09-23 01:44:38 -04:00
stackinfo.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
stap-probe-machine.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
startup.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
stdio-lock.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
string_private.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
symbol-hacks.h Break more lines before not after operators. 2019-02-25 13:19:19 +00:00
sysdep-cancel.h nptl: Remove tst-cancel-wrappers test and related macros 2019-01-03 18:38:08 -02:00
sysdep.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
thread_state.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
time-clockid.h Use clock_gettime to implement time. 2019-10-30 17:05:14 -03:00
tininess.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tls-macros.h * elf/tls-macros.h: #include_next <tls-macros.h> to get a sysdeps 2005-03-13 09:09:05 +00:00
tls-setup.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tls.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
tst-audit.h Move testsuite audit definitions to sysdeps tst-audit.h files. 2012-07-26 11:29:07 +00:00
tst-stack-align.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
unsecvars.h Ignore and remove LD_HWCAP_MASK for AT_SECURE programs (bug #21209) 2017-03-07 20:52:04 +05:30
unwind-dw2-fde-glibc.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
unwind-dw2-fde.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
unwind-dw2-fde.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
unwind-dw2.c Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
unwind-pe.c Update. 2004-03-10 10:04:19 +00:00
unwind-pe.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
unwind-resume.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
unwind.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00
utmp-equal.h Prefer https to http for gnu.org and fsf.org URLs 2019-09-07 02:43:31 -07:00