diff options
Diffstat (limited to 'sysdeps/nptl/dl-tls_init_tp.c')
-rw-r--r-- | sysdeps/nptl/dl-tls_init_tp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/sysdeps/nptl/dl-tls_init_tp.c b/sysdeps/nptl/dl-tls_init_tp.c index ca494dd3a5..fedb876fdb 100644 --- a/sysdeps/nptl/dl-tls_init_tp.c +++ b/sysdeps/nptl/dl-tls_init_tp.c @@ -21,6 +21,7 @@ #include <list.h> #include <pthreadP.h> #include <tls.h> +#include <rseq-internal.h> #ifndef __ASSUME_SET_ROBUST_LIST bool __nptl_set_robust_list_avail; @@ -57,11 +58,12 @@ __tls_pre_init_tp (void) void __tls_init_tp (void) { + struct pthread *pd = THREAD_SELF; + /* Set up thread stack list management. */ - list_add (&THREAD_SELF->list, &GL (dl_stack_user)); + list_add (&pd->list, &GL (dl_stack_user)); /* Early initialization of the TCB. */ - struct pthread *pd = THREAD_SELF; pd->tid = INTERNAL_SYSCALL_CALL (set_tid_address, &pd->tid); THREAD_SETMEM (pd, specific[0], &pd->specific_1stblock[0]); THREAD_SETMEM (pd, user_stack, true); @@ -90,6 +92,8 @@ __tls_init_tp (void) } } + rseq_register_current_thread (pd); + /* Set initial thread's stack block from 0 up to __libc_stack_end. It will be bigger than it actually is, but for unwind.c/pt-longjmp.c purposes this is good enough. */ |