glibc/sysdeps/generic
Frédéric Bérat 332f8e62af tls: Add debug logging for TLS and TCB management
Introduce the `DL_DEBUG_TLS` debug mask to enable detailed logging for
Thread-Local Storage (TLS) and Thread Control Block (TCB) management.

This change integrates a new `tls` option into the `LD_DEBUG`
environment variable, allowing developers to trace:
- TCB allocation, deallocation, and reuse events in `dl-tls.c`,
  `nptl/allocatestack.c`, and `nptl/nptl-stack.c`.
- Thread startup events, including the TID and TCB address, in
  `nptl/pthread_create.c`.

A new test, `tst-dl-debug-tid`, has been added to validate the
functionality of this new debug logging, ensuring that relevant messages
are correctly generated for both main and worker threads.

This enhances the debugging capabilities for diagnosing issues related
to TLS allocation and thread lifecycle within the dynamic linker.

Reviewed-by: DJ Delorie <dj@redhat.com>
2025-11-03 10:47:28 +01:00
..
net Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
netinet Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
nfs Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sys Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
Makefile Disable SFrame support by default 2025-07-24 15:51:58 -03:00
_G_config.h
_itoa.h elf: Canonicalize $ORIGIN in an explicit ld.so invocation [BZ 25263] 2025-03-13 16:50:16 -03:00
a.out.h
abort-instr.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
adaptive_spin_count.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
aio_misc.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
allocalim.h
arch-fd_to_filename.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
asm-syntax.h
atomic-machine.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
c++-types.data
calloc-clear-memory.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
confstr.h
crti.S
crtn.S
device-nrs.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dirstream.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-affinity.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-audit-check.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-auxv.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-cache.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-call_tls_init_tp.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-debug.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-dtprocnum.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-dtv.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-execve.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-extra_tls.h Add generic 'extra TLS' 2025-01-10 20:19:28 +00:00
dl-fcntl.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-fileid.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-fixup-attribute.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-hash.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-hwcap-check.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-irel.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-isa-level.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-lookupcfg.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-machine-rel.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-machine.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-minimal-malloc.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-mman.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-new-hash.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-osinfo.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-procinfo.c
dl-procruntime.c
dl-prop.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-protected.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-r_debug.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-relocate-ld.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-symbol-redir-ifunc.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-sysdep.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-tls.h elf: Always define TLS_TP_OFFSET 2025-01-09 19:30:44 +01:00
dl-tunables-parse.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-unistd.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-vdso-setup.c
dl-vdso-setup.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dl-vdso.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
dwarf2.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
elf-initfini.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
elf-read-prop.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
elf_machine_sym_no_match.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
elide.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
entry.h
errqueue.h
fast-jitter.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
fd_to_filename.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
features-time64.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
fenv_private.h math: Add fetestexcept internal alias 2025-09-11 14:46:07 -03:00
fix-float-double-convert-nan.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
fix-fp-int-compare-invalid.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
fix-fp-int-convert-overflow.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
fix-int-fp-convert-zero.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
float128-abi.h
fork.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
fpu_control.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
framestate.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
gcc-compat.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
gccframe.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
get-rounding-mode.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
getrandom-internal.h generic: Add missing parameter name to __getrandom_early_init 2025-05-28 10:00:41 +02:00
gmp-mparam.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
hp-timing-common.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
hp-timing.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
ifreq.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
ifunc-init.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
ifunc-sel.h
internal-signals.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
internal-sigset.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
intr-msg.h
ld.abilist
ldbl-classify-compat.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
ldconfig.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
ldsodefs.h tls: Add debug logging for TLS and TCB management 2025-11-03 10:47:28 +01:00
libBrokenLocale.abilist
libanl.abilist
libc-lock-arch.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
libc-lock.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
libc-mmap.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
libc-mtag.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
libc-start.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
libc-symver.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
libc.abilist
libc_malloc_debug.abilist
libc_start_call_main.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
libdl.abilist
libm-alias-double.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
libm-alias-float.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
libm-alias-float128.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
libm-alias-ldouble.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
libm.abilist
libnsl.abilist
libnss_compat.abilist
libnss_db.abilist
libnss_dns.abilist
libnss_files.abilist
libnss_hesiod.abilist
libnss_nis.abilist
libnss_nisplus.abilist
libpthread.abilist
libresolv.abilist
librt.abilist
libutil.abilist
link_map.h
linkmap.h
local-setxid.h
localplt.data
machine-gmon.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
machine-lock.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
machine-sp.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
malloc-alignment.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
malloc-hugepages.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
malloc-hugepages.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
malloc-machine.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
malloc-size.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
malloc-sysdep.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
math-barriers.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
math-nan-payload-double.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
math-nan-payload-float.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
math-narrow-alias-float128.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
math-narrow-alias.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
math-tests-arch.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
math-tests-exceptions.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
math-tests-rounding.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
math-tests-snan-cast.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
math-tests-snan-payload.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
math-tests-snan.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
math-tests-trap-force.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
math-tests-trap.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
math-tests.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
math-type-macros-double.h Implement C23 pown 2025-03-27 10:44:44 +00:00
math-type-macros-float.h Implement C23 pown 2025-03-27 10:44:44 +00:00
math-type-macros-float128.h Implement C23 pown 2025-03-27 10:44:44 +00:00
math-type-macros-ldouble.h Implement C23 pown 2025-03-27 10:44:44 +00:00
math-type-macros.h Implement C23 pown 2025-03-27 10:44:44 +00:00
math-use-builtins-ceil.h
math-use-builtins-copysign.h
math-use-builtins-fabs.h
math-use-builtins-ffs.h
math-use-builtins-floor.h
math-use-builtins-fma.h
math-use-builtins-fmax.h
math-use-builtins-fmin.h
math-use-builtins-llrint.h
math-use-builtins-llround.h math: Add builtin support for (l)lround(f) 2025-10-17 17:03:54 +00:00
math-use-builtins-logb.h
math-use-builtins-lrint.h
math-use-builtins-lround.h math: Add builtin support for (l)lround(f) 2025-10-17 17:03:54 +00:00
math-use-builtins-nearbyint.h
math-use-builtins-rint.h
math-use-builtins-round.h
math-use-builtins-roundeven.h
math-use-builtins-sqrt.h
math-use-builtins-trunc.h
math-use-builtins.h math: Add builtin support for (l)lround(f) 2025-10-17 17:03:54 +00:00
math_ldbl.h
math_ldbl_opt.h
math_private.h
math_private_calls.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
math_uint128.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
memcopy.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
memswap.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
min-eloop-threshold.h Remove eloop-threshold.h 2025-03-21 15:46:48 -03:00
mmap_info.h
mremap-failure.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
nan-high-order-bit.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
not-cancel.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
not-errno.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
nscd-types.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
pagecopy.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
paths.h
pointer_guard.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
profil-counter.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
pty-private.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
rtld-lowlevel.h
rtld_static_init.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
safe-fatal.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
set-freeres-fp.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
set-freeres-os.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
set-freeres-system.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
set-hooks-arch.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
setjmpP.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
setvmaname.h ld.so: Decorate BSS mappings 2025-01-30 10:16:37 -03:00
sframe-read.c sframe: Add support for SFRAME_F_FDE_FUNC_START_PCREL flag 2025-07-24 15:51:58 -03:00
sframe-read.h sframe: Add support for SFRAME_F_FDE_FUNC_START_PCREL flag 2025-07-24 15:51:58 -03:00
sframe.c elf: Add SFrame stack tracing 2025-07-14 10:56:37 +01:00
sframe.h sframe: Add support for SFRAME_F_FDE_FUNC_START_PCREL flag 2025-07-24 15:51:58 -03:00
sigcontextinfo.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
siglist-compat-def.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
siglist.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sigset-cvt-mask.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sigsetops.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
single-thread.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
spawn_int_def.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
stackguard-macros.h
stackinfo.h elf: early conversion of elf p_flags to mprotect flags 2025-08-27 10:45:45 -03:00
stap-probe-machine.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
startup.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
stdio-lock.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
string-fza.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
string-fzb.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
string-fzc.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
string-fzi.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
string-misc.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
string-opthr.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
string-optype.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
string-shift.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
struct_stat_time64.h
symbol-hacks.h
syscall_types.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
sysdep-cancel.h
sysdep.h S390: Use cfi_val_offset instead of cfi_escape. 2025-05-14 10:35:55 +02:00
thread_pointer.h Move <thread_pointer.h> to kernel-independent sysdeps directories 2025-01-09 19:30:16 +01:00
thread_state.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
time-clockid.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
time64-compat.h
tininess.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tls-internal-struct.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tls-internal.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tls-internal.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tls-setup.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tls.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-audit.h
tst-file-align.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
tst-stack-align.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
unsecvars.h elf: Remove LD_HWCAP_MASK / tunable glibc.cpu.hwcap_mask 2024-06-18 10:45:36 +02:00
unwind-arch.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
unwind-dw2-fde-glibc.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
unwind-dw2-fde.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
unwind-dw2-fde.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
unwind-dw2.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
unwind-link.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
unwind-pe.c
unwind-pe.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
unwind-resume.c Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
unwind-resume.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
unwind.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
utmp-equal.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
utmp-size.h Update copyright dates with scripts/update-copyrights 2025-01-01 11:22:09 -08:00
uw-sigframe.h elf: Add SFrame stack tracing 2025-07-14 10:56:37 +01:00
xstatver.h