提交 d5d0918f 编写于 作者: D dhy308

Save the tsd in new pthread stack.

Issue: I63P90
Test: libc-test pass
Signed-off-by: Ndhy308 <tony.gan@huawei.com>
上级 60544be4
......@@ -2842,9 +2842,12 @@ void __dls3(size_t *sp, size_t *auxv)
/* Actual copying to new TLS needs to happen after relocations,
* since the TLS images might have contained relocated addresses. */
if (initial_tls != builtin_tls) {
if (__init_tp(__copy_tls(initial_tls)) < 0) {
pthread_t self = __pthread_self();
pthread_t td = __copy_tls(initial_tls);
if (__init_tp(td) < 0) {
a_crash();
}
td->tsd = self->tsd;
} else {
size_t tmp_tls_size = libc.tls_size;
pthread_t self = __pthread_self();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册