Skip to content
Snippets Groups Projects
Commit ae3f3921 authored by Ariadne Conill's avatar Ariadne Conill :rabbit:
Browse files

main/musl: update pthread guard size patch to latest submission

parent 2a03458d
No related branches found
No related tags found
No related merge requests found
From 21845fbedb172de1e14946fcf4c517ebc4d12fc1 Mon Sep 17 00:00:00 2001 From 120a64e043955ed7dec4e72fabc0ea5392bf2ad4 Mon Sep 17 00:00:00 2001
From: William Pitcock <nenolod@dereferenced.org> From: William Pitcock <nenolod@dereferenced.org>
Date: Sat, 6 Jan 2018 04:42:44 +0000 Date: Sat, 6 Jan 2018 04:42:44 +0000
Subject: [PATCH] track pthread stack guard sizes Subject: [PATCH] track pthread stack guard sizes
...@@ -6,26 +6,36 @@ Subject: [PATCH] track pthread stack guard sizes ...@@ -6,26 +6,36 @@ Subject: [PATCH] track pthread stack guard sizes
some applications (rustc) are dependent on pthread_getattr_np() providing the guard size. some applications (rustc) are dependent on pthread_getattr_np() providing the guard size.
--- ---
src/internal/pthread_impl.h | 1 + src/internal/pthread_impl.h | 1 +
src/thread/pthread_create.c | 1 + src/thread/pthread_create.c | 3 ++-
src/thread/pthread_getattr_np.c | 1 + src/thread/pthread_getattr_np.c | 1 +
3 files changed, 3 insertions(+) 3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h
index 56e19348..c2cafeaa 100644 index f0b2c20c..4a0db987 100644
--- a/src/internal/pthread_impl.h --- a/src/internal/pthread_impl.h
+++ b/src/internal/pthread_impl.h +++ b/src/internal/pthread_impl.h
@@ -48,6 +48,7 @@ struct pthread { @@ -46,6 +46,7 @@ struct pthread {
char *dlerror_buf;
int dlerror_flag;
void *stdio_locks; void *stdio_locks;
+ size_t guard_size; + size_t guard_size;
uintptr_t canary_at_end; uintptr_t canary_at_end;
void **dtv_copy; void **dtv_copy;
}; };
struct __timer {
diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c diff --git a/src/thread/pthread_create.c b/src/thread/pthread_create.c
index 6cbf85b3..0faad765 100644 index 34cd9936..439ee363 100644
--- a/src/thread/pthread_create.c --- a/src/thread/pthread_create.c
+++ b/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 @@ -265,6 +265,7 @@ int __pthread_create(pthread_t *restrict res, const pthread_attr_t *restrict att
new->map_size = size; new->map_size = size;
new->stack = stack; new->stack = stack;
...@@ -47,5 +57,5 @@ index ae26a5ab..29a209bd 100644 ...@@ -47,5 +57,5 @@ index ae26a5ab..29a209bd 100644
a->_a_stackaddr = (uintptr_t)t->stack; a->_a_stackaddr = (uintptr_t)t->stack;
a->_a_stacksize = t->stack_size; a->_a_stacksize = t->stack_size;
-- --
2.15.0 2.16.1
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Maintainer: Timo Teräs <timo.teras@iki.fi> # Maintainer: Timo Teräs <timo.teras@iki.fi>
pkgname=musl pkgname=musl
pkgver=1.1.18 pkgver=1.1.18
pkgrel=5 pkgrel=6
pkgdesc="the musl c library (libc) implementation" pkgdesc="the musl c library (libc) implementation"
url="http://www.musl-libc.org/" url="http://www.musl-libc.org/"
arch="all" arch="all"
...@@ -149,7 +149,7 @@ compat() { ...@@ -149,7 +149,7 @@ compat() {
sha512sums="4d55c92efe41dfdd9fff6aca5dda76a632a3be60d10e5a7f66a4731d8f7040fb0a20b998965ba4d069b4f8a3527fcd7388e646cb66afc649c4d0cc6c3d358c9c musl-1.1.18.tar.gz sha512sums="4d55c92efe41dfdd9fff6aca5dda76a632a3be60d10e5a7f66a4731d8f7040fb0a20b998965ba4d069b4f8a3527fcd7388e646cb66afc649c4d0cc6c3d358c9c musl-1.1.18.tar.gz
7b44cc006d37672a67bc261de33e64d11f6426fd1ab3ff80f9f980aefc8e0b099ab61f95d110eeb59f75c2fe772fe13bc5546c194c3f90ca9ec4c812dfff6b1b 0001-fix-sysconf-for-infinite-rlimits.patch 7b44cc006d37672a67bc261de33e64d11f6426fd1ab3ff80f9f980aefc8e0b099ab61f95d110eeb59f75c2fe772fe13bc5546c194c3f90ca9ec4c812dfff6b1b 0001-fix-sysconf-for-infinite-rlimits.patch
c28abac671f531d200bd1ebc934fc57b1c04404e49237dd6cfde4fe72e4fd8b855df0e75f76d62ec930c56daa00a12a6a3b3bb1c86576c7504fdf9628ad58975 0001-use-the-name-UTC-instead-of-GMT-for-UTC-timezone.patch c28abac671f531d200bd1ebc934fc57b1c04404e49237dd6cfde4fe72e4fd8b855df0e75f76d62ec930c56daa00a12a6a3b3bb1c86576c7504fdf9628ad58975 0001-use-the-name-UTC-instead-of-GMT-for-UTC-timezone.patch
2012f7d977c6765ff18bf346315d8e460b41c84053e0ac415d7c62b196422ab1ec4cc7c62aed13acf5c6c2447971bd5748827f40b5bef58fbd206c6697e750b9 0001-track-pthread-stack-guard-sizes.patch 455ad7f2d7c32af536d47c9fcfbfcb259aceb07c461b8c0bb26466b2210ea58e343f3b3e34c50bb945da9206866c6fc70b6aa73402c06b558abba8108b3ce630 0001-track-pthread-stack-guard-sizes.patch
7e4c703e57a3564cd3ee1d5334b806cbe654355179ba55d4d25361dfc555eb4a7d081d80d64fdaff8476949afd04558d278b124d1fb108080beaa5ba2f8ce2b9 1000-implement-strftime-GNU-extension-padding-specifiers-.patch 7e4c703e57a3564cd3ee1d5334b806cbe654355179ba55d4d25361dfc555eb4a7d081d80d64fdaff8476949afd04558d278b124d1fb108080beaa5ba2f8ce2b9 1000-implement-strftime-GNU-extension-padding-specifiers-.patch
2c8e1dde1834238097b2ee8a7bfb53471a0d9cff4a5e38b55f048b567deff1cdd47c170d0578a67b1a039f95a6c5fbb8cff369c75b6a3e4d7ed171e8e86ebb8c 2000-pthread-internals-increase-DEFAULT_GUARD_SIZE-to-2-p.patch 2c8e1dde1834238097b2ee8a7bfb53471a0d9cff4a5e38b55f048b567deff1cdd47c170d0578a67b1a039f95a6c5fbb8cff369c75b6a3e4d7ed171e8e86ebb8c 2000-pthread-internals-increase-DEFAULT_GUARD_SIZE-to-2-p.patch
bdc6fe197779088507d6f8bb72560239f908a635b39eb677bfcf91da28b92ee52b67696e627dad08ccb8a7dcaf7a72b574276098fb3fddd4a6b646a0f0799785 3002-stdio-implement-fopencookie-3.patch bdc6fe197779088507d6f8bb72560239f908a635b39eb677bfcf91da28b92ee52b67696e627dad08ccb8a7dcaf7a72b574276098fb3fddd4a6b646a0f0799785 3002-stdio-implement-fopencookie-3.patch
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment