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 /main/mesa/adjust-cache-deflate-buffer.patch | |
| parent | 3a9dae77f9b009c82b2a95ef18c0283c59640772 (diff) | |
| download | aports-ff8996cea00e39d93c869434e263268eab704591.tar.bz2 aports-ff8996cea00e39d93c869434e263268eab704591.tar.xz | |
main/mesa: fix crashes due to large stack buffers
Diffstat (limited to 'main/mesa/adjust-cache-deflate-buffer.patch')
| -rw-r--r-- | main/mesa/adjust-cache-deflate-buffer.patch | 16 |
1 files changed, 16 insertions, 0 deletions
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 |
