diff options
Diffstat (limited to 'main/musl/0001-track-pthread-stack-guard-sizes.patch')
-rw-r--r-- | main/musl/0001-track-pthread-stack-guard-sizes.patch | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/main/musl/0001-track-pthread-stack-guard-sizes.patch b/main/musl/0001-track-pthread-stack-guard-sizes.patch deleted file mode 100644 index a16ddee1d8..0000000000 --- a/main/musl/0001-track-pthread-stack-guard-sizes.patch +++ /dev/null @@ -1,61 +0,0 @@ -From 120a64e043955ed7dec4e72fabc0ea5392bf2ad4 Mon Sep 17 00:00:00 2001 -From: William Pitcock <nenolod@dereferenced.org> -Date: Sat, 6 Jan 2018 04:42:44 +0000 -Subject: [PATCH] track pthread stack guard sizes - -some applications (rustc) are dependent on pthread_getattr_np() providing the guard size. ---- - src/internal/pthread_impl.h | 1 + - src/thread/pthread_create.c | 3 ++- - src/thread/pthread_getattr_np.c | 1 + - 3 files changed, 4 insertions(+), 1 deletion(-) - -diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h -index f0b2c20c..4a0db987 100644 ---- a/src/internal/pthread_impl.h -+++ b/src/internal/pthread_impl.h -@@ -46,6 +46,7 @@ struct pthread { - char *dlerror_buf; - int dlerror_flag; - void *stdio_locks; -+ size_t guard_size; - uintptr_t canary_at_end; - void **dtv_copy; - }; -diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c -index 34cd9936..439ee363 100644 ---- a/src/thread/pthread_create.c -+++ b/src/thread/pthread_create.c -@@ -232,8 +232,8 @@ int __pthread_create(pthread_t *restrict res, const pthread_attr_t *restrict att - memset(stack, 0, need); - } else { - size = ROUND(need); -- guard = 0; - } -+ guard = 0; - } else { - guard = ROUND(attr._a_guardsize); - size = guard + ROUND(attr._a_stacksize -@@ -265,6 +265,7 @@ int __pthread_create(pthread_t *restrict res, const pthread_attr_t *restrict att - new->map_size = size; - new->stack = stack; - new->stack_size = stack - stack_limit; -+ new->guard_size = guard; - new->start = entry; - new->start_arg = arg; - new->self = new; -diff --git a/src/thread/pthread_getattr_np.c b/src/thread/pthread_getattr_np.c -index ae26a5ab..29a209bd 100644 ---- a/src/thread/pthread_getattr_np.c -+++ b/src/thread/pthread_getattr_np.c -@@ -7,6 +7,7 @@ int pthread_getattr_np(pthread_t t, pthread_attr_t *a) - { - *a = (pthread_attr_t){0}; - a->_a_detach = !!t->detached; -+ a->_a_guardsize = t->guard_size; - if (t->stack) { - a->_a_stackaddr = (uintptr_t)t->stack; - a->_a_stacksize = t->stack_size; --- -2.16.1 - |