The package rpms/polyml.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/polyml.git/commit/?id=526803171ca....
Change:
-%ifarch %{arm}
Thanks.
Full change:
============
commit 526803171cafc0542fb796527ecfbca142b3cfe0
Author: Jerry James <loganjerry(a)gmail.com>
Date: Tue Nov 23 13:48:49 2021 -0700
Add upstream patch to fix segfault in the bytecode interpreter.
diff --git a/020d4d7.patch b/020d4d7.patch
new file mode 100644
index 0000000..244295d
--- /dev/null
+++ b/020d4d7.patch
@@ -0,0 +1,32 @@
+From 020d4d7b2831a6d7d109bd3c9cff78c9cd0bd326 Mon Sep 17 00:00:00 2001
+From: David Matthews <dm(a)prolingua.co.uk>
+Date: Tue, 23 Nov 2021 18:50:41 +0000
+Subject: [PATCH] Fix Overflow exception packet in Real.toInt in the
+ interpreter. Fixes #164.
+
+---
+ libpolyml/bytecode.cpp | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libpolyml/bytecode.cpp b/libpolyml/bytecode.cpp
+index dd08b14a..9aa4187e 100644
+--- a/libpolyml/bytecode.cpp
++++ b/libpolyml/bytecode.cpp
+@@ -1982,7 +1982,7 @@ enum ByteCodeInterpreter::_returnValue
ByteCodeInterpreter::RunInterpreter(TaskD
+ if (dv > (double)(MAXTAGGED + MAXTAGGED / 2) ||
+ dv < -(double)(MAXTAGGED + MAXTAGGED / 2))
+ {
+- *(--sp) = (PolyWord)overflowPacket;
++ taskData->SetException((poly_exn*)overflowPacket);
+ goto RAISE_EXCEPTION;
+ }
+ POLYSIGNED p;
+@@ -2006,7 +2006,7 @@ enum ByteCodeInterpreter::_returnValue
ByteCodeInterpreter::RunInterpreter(TaskD
+ // Check that the value can be tagged.
+ if (p > MAXTAGGED || p < -MAXTAGGED - 1)
+ {
+- *(--sp) = (PolyWord)overflowPacket;
++ taskData->SetException((poly_exn*)overflowPacket);
+ goto RAISE_EXCEPTION;
+ }
+ *sp = TAGGED(p);
diff --git a/polyml.spec b/polyml.spec
index 6d5beab..c27583e 100644
--- a/polyml.spec
+++ b/polyml.spec
@@ -3,12 +3,15 @@
Name: polyml
Version: 5.9
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: Poly/ML compiler and runtime system
License: LGPLv2+
URL:
https://www.polyml.org/
Source0:
https://github.com/%{name}/%{name}/archive/v%{version}/%{name}-%{version}...
+# Fix Overflow exception packet in Real.toInt in the interpreter
+# See
https://github.com/polyml/polyml/issues/164
+Patch0:
https://github.com/%{name}/%{name}/commit/020d4d7.patch
# The standard solution to kill the libtool-induced RPATH is to edit the
# libtool script to kill it. However, that causes problems for us as we need
@@ -55,13 +58,6 @@ Runtime libraries for Poly/ML.
# Fix end of line encoding
sed -i 's/\r//' documentation/main.css
-# One test segfaults on 32-bit bytecode systems. For Fedora, 32-bit ARM is
-# the only such system. Until upstream fixes the bug, skip this test. See
-#
https://github.com/polyml/polyml/issues/164
-%ifarch %{arm}
-sed -i '2iraise NotApplicable;' Tests/Succeed/Test160.ML
-%endif
-
%build
# Some hand-coded assembler is included. While it does contain an explicit
# section marker stating that the stack section does not need the executable
@@ -114,6 +110,9 @@ make check
%{_libdir}/libpolyml.so.13*
%changelog
+* Tue Nov 23 2021 Jerry James <loganjerry(a)gmail.com> - 5.9-2
+- Add upstream patch to fix segfault in the bytecode interpreter
+
* Sun Nov 21 2021 Jerry James <loganjerry(a)gmail.com> - 5.9-1
- Version 5.9
- Drop all patches