From 2d3e449728b063384e44760a75ac17c253d9913e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADt=20Ondruch?= Date: Wed, 18 Aug 2021 16:22:23 +0200 Subject: [PATCH] Fix ppc64le segfault when used via libvips. Resolves: rhbz#1917540 --- ...executor_set_program-to-save-OrcCode.patch | 41 +++++++++++++++++++ orc.spec | 11 ++++- 2 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 orc-0.4.32-executor-Fix-orc_executor_set_program-to-save-OrcCode.patch diff --git a/orc-0.4.32-executor-Fix-orc_executor_set_program-to-save-OrcCode.patch b/orc-0.4.32-executor-Fix-orc_executor_set_program-to-save-OrcCode.patch new file mode 100644 index 0000000..2b42f13 --- /dev/null +++ b/orc-0.4.32-executor-Fix-orc_executor_set_program-to-save-OrcCode.patch @@ -0,0 +1,41 @@ +From 59eb41b7bc5f701a040c546fe68d81fcfb9f01ef Mon Sep 17 00:00:00 2001 +From: Doug Nazar +Date: Tue, 17 Aug 2021 19:49:08 -0400 +Subject: [PATCH] executor: Fix orc_executor_set_program() to save OrcCode + +orc_executor_set_program() was missed when it was added to +orc_executor_new(). +--- + orc/orcexecutor.c | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) + +diff --git a/orc/orcexecutor.c b/orc/orcexecutor.c +index d1565cb..e36953f 100644 +--- a/orc/orcexecutor.c ++++ b/orc/orcexecutor.c +@@ -24,8 +24,7 @@ orc_executor_new (OrcProgram *program) + ex = malloc(sizeof(OrcExecutor)); + memset(ex,0,sizeof(OrcExecutor)); + +- ex->program = program; +- ex->arrays[ORC_VAR_A2] = program->orccode; ++ orc_executor_set_program (ex, program); + + return ex; + } +@@ -78,11 +77,7 @@ void + orc_executor_set_program (OrcExecutor *ex, OrcProgram *program) + { + ex->program = program; +- if (program->code_exec) { +- ex->arrays[ORC_VAR_A1] = (void *)program->code_exec; +- } else { +- ex->arrays[ORC_VAR_A1] = (void *)orc_executor_emulate; +- } ++ ex->arrays[ORC_VAR_A2] = program->orccode; + } + + void +-- +GitLab + diff --git a/orc.spec b/orc.spec index 7d89a20..9e7655b 100644 --- a/orc.spec +++ b/orc.spec @@ -1,11 +1,14 @@ Name: orc Version: 0.4.31 -Release: 5%{?dist} +Release: 6%{?dist} Summary: The Oil Run-time Compiler License: BSD URL: http://cgit.freedesktop.org/gstreamer/orc/ Source0: http://gstreamer.freedesktop.org/src/orc/%{name}-%{version}.tar.xz +# Fix ppc64le segfault when used via libvips. +# https://bugzilla.redhat.com/show_bug.cgi?id=1917540 +Patch0: orc-0.4.32-executor-Fix-orc_executor_set_program-to-save-OrcCode.patch BuildRequires: meson >= 0.47.0 BuildRequires: gcc @@ -48,6 +51,8 @@ The Orc compiler, to produce optimized code. %prep %setup -q +%patch0 -p1 + %build %meson -D default_library=shared %meson_build @@ -88,6 +93,10 @@ rm -rf %{buildroot}/%{_libdir}/orc %changelog +* Wed Aug 18 2021 Vít Ondruch - 0.4.31-6 +- Fix ppc64le segfault when used via libvips. + Resolves: rhbz#1917540 + * Thu Jul 22 2021 Fedora Release Engineering - 0.4.31-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild