diff options
author | CyberLeo <cyberleo@cyberleo.net> | 2020-03-28 05:45:52 -0500 |
---|---|---|
committer | CyberLeo <cyberleo@cyberleo.net> | 2020-03-28 05:45:52 -0500 |
commit | 9297468fa579836e3a6a381b798feb6b78217c2d (patch) | |
tree | 53168212f427afbcf0693b534530a4af803152e9 /user/mesa/disk_cache-stack-overflow.patch | |
parent | a63cc05c53a6f4c22422dc8c69808b14d87a6f6e (diff) | |
parent | da5a69b65a8791fffa6e93366ee585f87eff136d (diff) | |
download | packages-9297468fa579836e3a6a381b798feb6b78217c2d.tar.gz packages-9297468fa579836e3a6a381b798feb6b78217c2d.tar.bz2 packages-9297468fa579836e3a6a381b798feb6b78217c2d.tar.xz packages-9297468fa579836e3a6a381b798feb6b78217c2d.zip |
Merge branch 'master' into zfs
Diffstat (limited to 'user/mesa/disk_cache-stack-overflow.patch')
-rw-r--r-- | user/mesa/disk_cache-stack-overflow.patch | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/user/mesa/disk_cache-stack-overflow.patch b/user/mesa/disk_cache-stack-overflow.patch deleted file mode 100644 index 3fad95259..000000000 --- a/user/mesa/disk_cache-stack-overflow.patch +++ /dev/null @@ -1,42 +0,0 @@ -The disk cache code tries to allocate a 256 Kbyte buffer on the stack. -Since musl only gives 80 Kbyte of stack space per thread, this causes a trap. - ---- mesa-17.3.1/src/util/disk_cache.c.old 2017-12-21 11:31:22.000000000 -0600 -+++ mesa-17.3.1/src/util/disk_cache.c 2017-12-29 01:17:15.625633901 -0600 -@@ -716,7 +716,7 @@ - deflate_and_write_to_disk(const void *in_data, size_t in_data_size, int dest, - const char *filename) - { -- unsigned char out[BUFSIZE]; -+ unsigned char *out; - - /* allocate deflate state */ - z_stream strm; -@@ -733,6 +733,11 @@ - /* compress until end of in_data */ - size_t compressed_size = 0; - int flush; -+ -+ out = calloc(1, BUFSIZE); -+ if (out == NULL) -+ return 0; -+ - do { - int remaining = in_data_size - BUFSIZE; - flush = remaining > 0 ? Z_NO_FLUSH : Z_FINISH; -@@ -754,6 +759,7 @@ - ssize_t written = write_all(dest, out, have); - if (written == -1) { - (void)deflateEnd(&strm); -+ free(out); - return 0; - } - } while (strm.avail_out == 0); -@@ -768,6 +774,7 @@ - - /* clean up and return */ - (void)deflateEnd(&strm); -+ free(out); - return compressed_size; - } - |