Fix ppc64le segfault when used via libvips.

Resolves: rhbz#1917540
This commit is contained in:
Vít Ondruch 2021-08-18 16:22:23 +02:00
parent 8c609cadf9
commit 2d3e449728
2 changed files with 51 additions and 1 deletions

View File

@ -0,0 +1,41 @@
From 59eb41b7bc5f701a040c546fe68d81fcfb9f01ef Mon Sep 17 00:00:00 2001
From: Doug Nazar <nazard@nazar.ca>
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

View File

@ -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 <vondruch@redhat.com> - 0.4.31-6
- Fix ppc64le segfault when used via libvips.
Resolves: rhbz#1917540
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.4.31-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild