File: 0003-no-openmp-threads.patch

package info (click to toggle)
php-imagick 3.8.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,288 kB
  • sloc: ansic: 17,876; php: 1,440; xml: 444; pascal: 80; sh: 19; makefile: 2
file content (29 lines) | stat: -rw-r--r-- 836 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From: Steve Langasek <steve.langasek@ubuntu.com>
Date: Sat, 10 Oct 2020 12:25:53 +0200
Subject: limit the number of openmp threads used to 1

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1549942

The php-imagick 3.4.0 test suite fails with various segfaults when openmp
threads are in use.  Force the openmp thread count to 1 to avoid this
problem.

This patch is a workaround only; it is currently unknown if the root bug
lies in php-imagick or in imagemagick.
---
 imagick-3.8.0/imagick.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/imagick-3.8.0/imagick.c b/imagick-3.8.0/imagick.c
index 15dee80..c8db3ff 100644
--- a/imagick-3.8.0/imagick.c
+++ b/imagick-3.8.0/imagick.c
@@ -1157,6 +1157,8 @@ PHP_MINIT_FUNCTION(imagick)
 		checkImagickVersion();
 	}
 
+	SetMagickResourceLimit(ThreadResource, 1);
+
 	return SUCCESS;
 }