summaryrefslogtreecommitdiff
path: root/media-libs/netpbm/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-01-02 20:24:39 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-01-02 20:24:39 +0000
commit7a13078cb414752df1133d1767cc29260dc60fda (patch)
tree9e90a6f188f34228806cf884fc9733e53912a371 /media-libs/netpbm/files
parent7e76f9a8d4e868d30c8bf1781655cc25574c80f8 (diff)
gentoo auto-resync : 02:01:2023 - 20:24:39
Diffstat (limited to 'media-libs/netpbm/files')
-rw-r--r--media-libs/netpbm/files/netpbm-11.1.0-fix-clang-O2.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/media-libs/netpbm/files/netpbm-11.1.0-fix-clang-O2.patch b/media-libs/netpbm/files/netpbm-11.1.0-fix-clang-O2.patch
new file mode 100644
index 000000000000..4427676b9b35
--- /dev/null
+++ b/media-libs/netpbm/files/netpbm-11.1.0-fix-clang-O2.patch
@@ -0,0 +1,26 @@
+When compiling with clang and -O2, local variable origJmpbufP with value
+changed after setjmp contains garbage after longjmp.
+
+According to glibc documentation, making it volatile should have fixed the
+issue, but it didn't. Static outside the function works.
+
+Bug: https://bugs.gentoo.org/885561
+
+--- a/lib/libpamread.c
++++ b/lib/libpamread.c
+@@ -25,6 +25,7 @@
+ #include "fileio.h"
+ #include "pam.h"
+
++static jmp_buf * origJmpbufP = NULL;
+
+ static void
+ readPbmRow(const struct pam * const pamP,
+@@ -35,7 +36,6 @@
+ "It says PBM format, but 'depth' member is not 1.");
+ else {
+ jmp_buf jmpbuf;
+- jmp_buf * origJmpbufP;
+ unsigned char * bitrow;
+
+ bitrow = (unsigned char *) pbm_allocrow(pbm_packed_bytes(pamP->width));