about summary refs log tree commit diff
path: root/nixpkgs/pkgs/os-specific/linux/musl/stacksize-bump.patch
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:36 +0000
committerAlyssa Ross <hi@alyssa.is>2019-01-07 02:18:47 +0000
commit36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2 (patch)
treeb3faaf573407b32aa645237a4d16b82778a39a92 /nixpkgs/pkgs/os-specific/linux/musl/stacksize-bump.patch
parent4e31070265257dc67d120c27e0f75c2344fdfa9a (diff)
parentabf060725d7614bd3b9f96764262dfbc2f9c2199 (diff)
downloadnixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.gz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.bz2
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.lz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.xz
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.tar.zst
nixlib-36f56d99fa0a0765c9f1de4a5f17a9b05830c3f2.zip
Add 'nixpkgs/' from commit 'abf060725d7614bd3b9f96764262dfbc2f9c2199'
git-subtree-dir: nixpkgs
git-subtree-mainline: 4e31070265257dc67d120c27e0f75c2344fdfa9a
git-subtree-split: abf060725d7614bd3b9f96764262dfbc2f9c2199
Diffstat (limited to 'nixpkgs/pkgs/os-specific/linux/musl/stacksize-bump.patch')
-rw-r--r--nixpkgs/pkgs/os-specific/linux/musl/stacksize-bump.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/os-specific/linux/musl/stacksize-bump.patch b/nixpkgs/pkgs/os-specific/linux/musl/stacksize-bump.patch
new file mode 100644
index 000000000000..fb5373005cbf
--- /dev/null
+++ b/nixpkgs/pkgs/os-specific/linux/musl/stacksize-bump.patch
@@ -0,0 +1,36 @@
+From c0058ab465e950c2c3302d2b62e21cc0b494224b Mon Sep 17 00:00:00 2001
+From: Rich Felker <dalias@aerifal.cx>
+Date: Tue, 18 Sep 2018 23:11:49 -0400
+Subject: [PATCH 3/4] increase default thread stack/guard size
+
+stack size default is increased from 80k to 128k. this coincides with
+Linux's hard-coded default stack for the main thread (128k is
+initially committed; growth beyond that up to ulimit is contingent on
+additional allocation succeeding) and GNU ld's default PT_GNU_STACK
+size for FDPIC, at least on sh.
+
+guard size default is increased from 4k to 8k to reduce the risk of
+guard page jumping on overflow, since use of just over 4k of stack is
+common (PATH_MAX buffers, etc.).
+---
+ src/internal/pthread_impl.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/internal/pthread_impl.h b/src/internal/pthread_impl.h
+index e73a251f..d491f975 100644
+--- a/src/internal/pthread_impl.h
++++ b/src/internal/pthread_impl.h
+@@ -185,8 +185,8 @@ hidden void __inhibit_ptc(void);
+ extern hidden unsigned __default_stacksize;
+ extern hidden unsigned __default_guardsize;
+ 
+-#define DEFAULT_STACK_SIZE 81920
+-#define DEFAULT_GUARD_SIZE 4096
++#define DEFAULT_STACK_SIZE 131072
++#define DEFAULT_GUARD_SIZE 8192
+ 
+ #define DEFAULT_STACK_MAX (8<<20)
+ #define DEFAULT_GUARD_MAX (1<<20)
+-- 
+2.19.0
+