diff options
author | Timo Teräs <timo.teras@iki.fi> | 2018-12-14 14:02:21 +0200 |
---|---|---|
committer | Timo Teräs <timo.teras@iki.fi> | 2018-12-14 14:03:40 +0200 |
commit | ff8996cea00e39d93c869434e263268eab704591 (patch) | |
tree | 87bb3d4acdfe0ffb75473fb513f39aafd6e6167e | |
parent | 3a9dae77f9b009c82b2a95ef18c0283c59640772 (diff) | |
download | aports-ff8996cea00e39d93c869434e263268eab704591.tar.bz2 aports-ff8996cea00e39d93c869434e263268eab704591.tar.xz |
main/mesa: fix crashes due to large stack buffers
-rw-r--r-- | main/mesa/APKBUILD | 4 | ||||
-rw-r--r-- | main/mesa/adjust-cache-deflate-buffer.patch | 16 |
2 files changed, 19 insertions, 1 deletions
diff --git a/main/mesa/APKBUILD b/main/mesa/APKBUILD index 6830128763..01ddfb3678 100644 --- a/main/mesa/APKBUILD +++ b/main/mesa/APKBUILD @@ -1,7 +1,7 @@ # Maintainer: Natanael Copa <ncopa@alpinelinux.org> pkgname=mesa pkgver=18.1.7 -pkgrel=0 +pkgrel=1 pkgdesc="Mesa DRI OpenGL library" url="https://www.mesa3d.org" arch="all" @@ -56,6 +56,7 @@ makedepends=" " source=" https://mesa.freedesktop.org/archive/mesa-$pkgver.tar.xz + adjust-cache-deflate-buffer.patch glx_ro_text_segm.patch musl-fix-includes.patch drmdeps.patch @@ -297,6 +298,7 @@ _vulkan() { esac } sha512sums="697c4f441ae52bc867d9d73b103094a29102168c248a502c4ea0fc48f51bcb86b2e741da39e882f24131326d460cdb1416415604c6994d1b8c09fb8a153a5c77 mesa-18.1.7.tar.xz +cdf22d2da3328e116c379264886bd01fd3ad5cc45fe03dc6fd97bdc4794502598ee195c0b9d975fa264d6ac31c6fa108c0535c91800ecf4fcabfd308e53074cc adjust-cache-deflate-buffer.patch 8a434ffefdc6ce924d613727a8649b9a77ad9f0ed0674c9cfb8f6ff0fec483f9318e681254535b62c957db1d0432f96427f917e2f139f4c65ef761bffb528255 glx_ro_text_segm.patch 2c9cb0fa890d29e4140d956ee52a74b4522e29e44fadfc2dd144e581c2701a1d8842ab5c8ff0b68e14b2242e2812a9d4ac0aed1c3314a2143333bc37f2323b58 musl-fix-includes.patch 3409483217dbec732286e628e268e1e8cd392b7e8efb13c7651b38e6563aa5a4988279efb029096dcd092ebe7a92eece103014ed420d2b242eab8d0237f056fd drmdeps.patch" diff --git a/main/mesa/adjust-cache-deflate-buffer.patch b/main/mesa/adjust-cache-deflate-buffer.patch new file mode 100644 index 0000000000..3c116cb69e --- /dev/null +++ b/main/mesa/adjust-cache-deflate-buffer.patch @@ -0,0 +1,16 @@ +diff -ru mesa-18.1.7.orig/src/util/disk_cache.c mesa-18.1.7/src/util/disk_cache.c +--- mesa-18.1.7.orig/src/util/disk_cache.c 2018-08-24 19:25:19.000000000 +0300 ++++ mesa-18.1.7/src/util/disk_cache.c 2018-12-14 13:59:15.433631846 +0200 +@@ -721,8 +721,11 @@ + /* From the zlib docs: + * "If the memory is available, buffers sizes on the order of 128K or 256K + * bytes should be used." ++ * ++ * But that is performance optimization for large files. To keep stack usage ++ * in sensible amount (wrt. musl default stack) we use smaller stack on Alpine. + */ +-#define BUFSIZE 256 * 1024 ++#define BUFSIZE 4 * 1024 + + /** + * Compresses cache entry in memory and writes it to disk. Returns the size |