[polymake] Add -lrslib patch to fix a segfault (bz 923269).

Jerry James jjames at fedoraproject.org
Wed Mar 20 14:41:48 UTC 2013


commit aeaf3f32e1824a3df7567c5bc134c0a440b234a3
Author: Jerry James <jamesjer at betterlinux.com>
Date:   Wed Mar 20 08:41:38 2013 -0600

    Add -lrslib patch to fix a segfault (bz 923269).

 polymake-lrslib.patch |   11 +++++++++++
 polymake.spec         |    9 ++++++++-
 2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/polymake-lrslib.patch b/polymake-lrslib.patch
new file mode 100644
index 0000000..e001754
--- /dev/null
+++ b/polymake-lrslib.patch
@@ -0,0 +1,11 @@
+--- apps/polytope/src/lrs_interface.cc.orig	2011-12-20 17:47:59.000000000 -0700
++++ apps/polytope/src/lrs_interface.cc	2013-03-19 16:44:34.503260585 -0600
+@@ -310,7 +310,7 @@
+    {
+       // initialize static lrs data
+       Lin=0;
+-      Q=lrs_alloc_dat(0);
++      Q=lrs_alloc_dat("");
+       if (!Q) throw std::bad_alloc();
+       Q->m=Inequalities.rows()+Equations.rows();
+       Q->n=Inequalities.cols();
diff --git a/polymake.spec b/polymake.spec
index 9f3075a..1de7926 100644
--- a/polymake.spec
+++ b/polymake.spec
@@ -9,7 +9,7 @@
 
 Name:           polymake
 Version:        2.12
-Release:        4%{?dist}
+Release:        5%{?dist}
 Summary:        Algorithms on convex polytopes and polyhedra
 
 License:        GPLv2+
@@ -27,6 +27,9 @@ Patch0:         %{name}-fedora.patch
 Patch1:         %{name}-bliss.patch
 # Patch from upstream: adapt the sources to perl >= 5.15.
 Patch2:         %{name}-perl.patch
+# This patch was sent upstream 20 Mar 2013.  Fix a call to an lrslib function
+# that segfaults when given a NULL argument.
+Patch3:         %{name}-lrslib.patch
 
 BuildRequires:  bliss-devel
 BuildRequires:  cddlib-devel
@@ -101,6 +104,7 @@ This package contains documentation for %{name}.
 %patch0
 %patch1
 %patch2
+%patch3
 
 # Make sure we don't build against the bundled libraries.
 # Don't delete the jreality directory, though, or the installer crashes.
@@ -200,6 +204,9 @@ find %{buildroot}%{polydir} -name \*.so | xargs chmod 0755
 %doc doc/*
 
 %changelog
+* Wed Mar 20 2013 Jerry James <loganjerry at gmail.com> - 2.12-5
+- Add -lrslib patch to fix a segfault (bz 923269)
+
 * Wed Feb 27 2013 Jerry James <loganjerry at gmail.com> - 2.12-4
 - Remove rpath and -L%%{_libdir} from polymake-config --ldflags output
 


More information about the scm-commits mailing list