aboutsummaryrefslogtreecommitdiff
path: root/nptl/test-condattr-printers.c
diff options
context:
space:
mode:
authorFlorian Weimer <fw@deneb.enyo.de>2019-10-28 13:15:19 +0100
committerFlorian Weimer <fw@deneb.enyo.de>2019-10-28 14:31:05 +0100
commit93e07b2f9ef6825c7165f4587d2204464c83959a (patch)
tree4425fc20f7ee96db1122d8772397240c47865dc7 /nptl/test-condattr-printers.c
parentf0ead7b63b95ef1920197f50b6d4abf407f9ebe7 (diff)
downloadglibc-93e07b2f9ef6825c7165f4587d2204464c83959a.tar
glibc-93e07b2f9ef6825c7165f4587d2204464c83959a.tar.gz
glibc-93e07b2f9ef6825c7165f4587d2204464c83959a.tar.bz2
glibc-93e07b2f9ef6825c7165f4587d2204464c83959a.zip
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_prepare 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.
Diffstat (limited to 'nptl/test-condattr-printers.c')
0 files changed, 0 insertions, 0 deletions