提交 ea7891a6 编写于 作者: R Rich Felker

fix pthread_create regression from stack/guard size simplification

commit 33ce9208 broke pthread_create
in the case where a null attribute pointer is passed; rather than
using the default sizes, sizes of 0 (plus the remainder of one page
after TLS/TCB use) were used.
上级 04983f22
......@@ -186,7 +186,10 @@ int __pthread_create(pthread_t *restrict res, const pthread_attr_t *restrict att
| CLONE_THREAD | CLONE_SYSVSEM | CLONE_SETTLS
| CLONE_PARENT_SETTID | CLONE_CHILD_CLEARTID | CLONE_DETACHED;
int do_sched = 0;
pthread_attr_t attr = {0};
pthread_attr_t attr = {
._a_stacksize = DEFAULT_STACK_SIZE,
._a_guardsize = DEFAULT_GUARD_SIZE,
};
if (!libc.can_do_threads) return ENOSYS;
self = __pthread_self();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册