aboutsummaryrefslogtreecommitdiffstats
path: root/testing/py3-ujson/lower-stack-usage.patch
diff options
context:
space:
mode:
authorLeo <thinkabit.ukim@gmail.com>2019-05-29 21:35:03 -0300
committerprspkt <prspkt@protonmail.com>2019-05-30 20:37:52 +0300
commit28ad15c12f16ebdad2bdc668c4ed8f27a2c34f7a (patch)
tree9d0436a1356c1138bb7f697213f8fca69538c169 /testing/py3-ujson/lower-stack-usage.patch
parent3bd674039b37f0c0f7b3f1c39eb9ae8fd402f499 (diff)
downloadaports-28ad15c12f16ebdad2bdc668c4ed8f27a2c34f7a.tar.bz2
aports-28ad15c12f16ebdad2bdc668c4ed8f27a2c34f7a.tar.xz
testing/py3-ujson: rename from py-ujson
Diffstat (limited to 'testing/py3-ujson/lower-stack-usage.patch')
-rw-r--r--testing/py3-ujson/lower-stack-usage.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/testing/py3-ujson/lower-stack-usage.patch b/testing/py3-ujson/lower-stack-usage.patch
new file mode 100644
index 0000000000..de3258cfde
--- /dev/null
+++ b/testing/py3-ujson/lower-stack-usage.patch
@@ -0,0 +1,19 @@
+From: Shiz <hi@shiz.me>
+Bug-Report: https://github.com/esnme/ultrajson/issues/254
+
+musl default thread size is 80 kiB, so using 128 kiB by default will
+overflow the stack and cause segmentation faults.
+
+Allocating 128 kiB on the stack is a rather bad idea anyway, so we'll
+lower it to 8 kiB.
+--- ultrajson-1.35/lib/ultrajson.h
++++ ultrajson-1.35-patched/lib/ultrajson.h
+@@ -77,7 +77,7 @@
+ /*
+ Dictates and limits how much stack space for buffers UltraJSON will use before resorting to provided heap functions */
+ #ifndef JSON_MAX_STACK_BUFFER_SIZE
+-#define JSON_MAX_STACK_BUFFER_SIZE 131072
++#define JSON_MAX_STACK_BUFFER_SIZE 8192
+ #endif
+
+ #ifdef _WIN32