Resize DTV if the current DTV isn't big enough

System Internals / glibc - H.J. Lu [gmail.com] - 28 November 2014 09:57 UTC

This patch changes _dl_allocate_tls_init to resize DTV if the current DTV isn't big enough. Tested on X86-64, x32 and ia32.

[BZ #13862]
- elf/dl-tls.c: Include . (oom): Remove #ifdef SHARED/#endif. (_dl_static_dtv, _dl_initial_dtv): Moved before ... (_dl_resize_dtv): This. Extracted from _dl_update_slotinfo. (_dl_allocate_tls_init): Resize DTV if the current DTV isn't big enough. (_dl_update_slotinfo): Call _dl_resize_dtv to resize DTV.
- nptl/Makefile (tests): Add tst-stack4. (modules-names): Add tst-stack4mod. ($(objpfx)tst-stack4): New. (tst-stack4mod.sos): Likewise. ($(objpfx)tst-stack4.out): Likewise. ($(tst-stack4mod.sos)): Likewise. (clean): Likewise.
- nptl/tst-stack4.c: New file.
- nptl/tst-stack4mod.c: Likewise.

d8dd008 Resize DTV if the current DTV isn't big enough
ChangeLog | 20 +++++++
elf/dl-tls.c | 102 +++++++++++++++++++-------------
nptl/Makefile | 17 +++++-
nptl/tst-stack4.c | 159 ++++++++++++++++++++++++++++++++++++++++++++++++++
nptl/tst-stack4mod.c | 28 +++++++++
5 files changed, 283 insertions(+), 43 deletions(-)

Upstream: sourceware.org


  • Share