aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libmilter
diff options
context:
space:
mode:
authorStefan Wagner <stw@bit-strickerei.de>2016-11-07 12:06:52 +0100
committerJakub Jirutka <jakub@jirutka.cz>2016-11-07 13:55:48 +0100
commit2139016e4dd63047a251a0b252e43d79dcffcd64 (patch)
tree93b9da4b35b12d12d271c4e0411ed5a4381621b6 /testing/libmilter
parent76bd1baf8e87c784714de73e9c61725ca4b7ccb0 (diff)
downloadaports-2139016e4dd63047a251a0b252e43d79dcffcd64.tar.bz2
aports-2139016e4dd63047a251a0b252e43d79dcffcd64.tar.xz
testing/libmilter: set default pthread stack size to 256 KB
Diffstat (limited to 'testing/libmilter')
-rw-r--r--testing/libmilter/APKBUILD8
-rw-r--r--testing/libmilter/default-pthread-stacksize.patch20
2 files changed, 13 insertions, 15 deletions
diff --git a/testing/libmilter/APKBUILD b/testing/libmilter/APKBUILD
index 311023a90c..608d044e16 100644
--- a/testing/libmilter/APKBUILD
+++ b/testing/libmilter/APKBUILD
@@ -5,7 +5,7 @@ pkgname=libmilter
_pkgname="sendmail"
pkgver=1.0.2
_pkgver=8.15.2
-pkgrel=2
+pkgrel=3
pkgdesc="Sendmail Mail Filter API"
url="http://www.sendmail.com/sm/open_source"
arch="all"
@@ -38,13 +38,13 @@ package() {
md5sums="a824fa7dea4d3341efb6462ccd816f00 sendmail.8.15.2.tar.gz
49558fc2c9e38f433e0dc64d76705c05 libmilter-sharedlib.patch
-cf8d0f06d44f05f45016eee8ce644949 default-pthread-stacksize.patch
+c1aa7f5db24f0d8cd19f6b71f2c23695 default-pthread-stacksize.patch
e9fc99ec22265e5e561711f64bb9a0fa site.config.m4"
sha256sums="24f94b5fd76705f15897a78932a5f2439a32b1a2fdc35769bb1a5f5d9b4db439 sendmail.8.15.2.tar.gz
3a753b0881fe622814b471ee5f9037905c7cc3ed08ef74908464ab5307e59d5a libmilter-sharedlib.patch
-42fcd47f63248a01e9de7697ada2b52fc0aaa559683cfffa8b7198a93b98aa20 default-pthread-stacksize.patch
+d04f6f653c64857843f84a76991cdc3cbbff84093e43cc0baf5485b2f726056c default-pthread-stacksize.patch
fb8d43d33dda08aac9762983cadb24c54d5e3130b8808dadf4d189ceea564f48 site.config.m4"
sha512sums="04feb37316c13b66b1518596507a7da7c16cb0bf1abf10367f7fd888a428fadb093a9efa55342fa55b936c3f0cbdc63b9e2505cd99201a69a0c05b8ad65f49f9 sendmail.8.15.2.tar.gz
31c36b57739946c1b9c7c85307fe5c53c45d7f8cbf427a0f2248db8b74871a6f5a30ef1af524915821aeca54310d28272bcd0a587cb918192214fa5c30e4a8da libmilter-sharedlib.patch
-ccfd21b6537362e910d721c804975e89feddf8cd9218434a5c70e3f13cb5e5ea4a2a0585fda09241a8da2e697a12e59308bcef0323c5e779166c56d07424c15a default-pthread-stacksize.patch
+d3e12943fe7e9babdf700a2d8c0229bc16fa2ea16097615600341dee13f137b157ffa4b03f76c92ba9c5552ca3bf01cb598f6a6201720408df3a37247001a219 default-pthread-stacksize.patch
b939c19a82cd56f06102a7ad9f446c788d1eff0870f35c2f7d0a904782a7524f25adbb16c57373e0f592247d9898fdd1ef4212da15239b96ddbd9ff5010c630f site.config.m4"
diff --git a/testing/libmilter/default-pthread-stacksize.patch b/testing/libmilter/default-pthread-stacksize.patch
index 4e3524c230..9993adfece 100644
--- a/testing/libmilter/default-pthread-stacksize.patch
+++ b/testing/libmilter/default-pthread-stacksize.patch
@@ -1,15 +1,13 @@
-Set default pthread stack size to 8 MB
+Set default pthread stack size to 256 KB
-This patch tries to fix various crashes for applications depending on
-libmilter by setting the stack size for pthreads to 8 MB. The default
-stack size for musl libc is set to 80 KB whereas glibc has it set
-to 8 MB. This causes problems when a large amount of memory is
-allocated on the stack.
+This patch tries to fix various crashes for applications depending on libmilter
+by setting the stack size for pthreads to 256 KB. The default stack size for
+musl libc is set to 80 KB whereas glibc has it set to 8 MB. This causes problems
+when a large amount of memory is allocated on the stack.
-For example, opendkim allocates blocks of 64 KB multiple times, which
-causes libmilter (and therefore opendkim) to crash.
-Maybe a stack size of 1 MB or 2 MB would be sufficient, but as opendkim
-depends on the default glibc behavior, 8 MB should be safe.
+For example, opendkim allocates blocks of 64 KB multiple times, which causes
+libmilter (and therefore opendkim) to crash. For now, a stack size of 256 KB
+looks sufficient and makes opendkim stop crashing.
Fixes https://bugs.alpinelinux.org/issues/6360
@@ -37,7 +35,7 @@ Fixes https://bugs.alpinelinux.org/issues/6360
+int thread_create(pthread_t *ptid, void *(*wr) (void *), void *arg) {
+ pthread_attr_t attr;
+ pthread_attr_init(&attr);
-+ pthread_attr_setstacksize(&attr,8*1024*1024);
++ pthread_attr_setstacksize(&attr,256*1024);
+ return pthread_create(ptid, &attr, wr, arg);
+}