[linbox] 01/05: Imported Debian patch 1.3.2-1.1
Doug Torrance
dtorrance-guest at moszumanska.debian.org
Tue Jul 19 19:14:10 UTC 2016
This is an automated email from the git hooks/post-receive script.
dtorrance-guest pushed a commit to branch master
in repository linbox.
commit c3e418f469873bbc0a086df281fbcc9eb1168bc0
Author: Anibal Monsalve Salazar <anibal at debian.org>
Date: Sun Feb 16 05:27:42 2014 +0000
Imported Debian patch 1.3.2-1.1
---
debian/changelog | 10 ++++++
debian/patches/fix-RR-RecCounter.patch | 56 ++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 67 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index b649aa2..3912831 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+linbox (1.3.2-1.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix "FTBFS: build failed on post-compile-test on mips/mipsel"
+ Add fix-RR-RecCounter.patch
+ Patch by Dejan Latinovic
+ Closes: #733917
+
+ -- Anibal Monsalve Salazar <anibal at debian.org> Sun, 16 Feb 2014 05:27:42 +0000
+
linbox (1.3.2-1) unstable; urgency=low
[ Lifeng Sun ]
diff --git a/debian/patches/fix-RR-RecCounter.patch b/debian/patches/fix-RR-RecCounter.patch
new file mode 100644
index 0000000..66d5f6b
--- /dev/null
+++ b/debian/patches/fix-RR-RecCounter.patch
@@ -0,0 +1,56 @@
+Author: Dejan Latinovic <Dejan.Latinovic at rt-rk.com>
+Description: Set RecCounter=0 if rbound_==0 to avoid cast of -inf.
+
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=733917
+
+Test test-det on i386 or amd64 successfully pass after a few iterations, on
+mips this test has an enormous number of iterations and build of the linbox
+package on buildd breaks after 300 minutes of inactivity.
+
+The reason for this behavior is that in:
+
+ linbox/algorithms/rational-reconstruction-base.h
+
+the way to calculate RecCounter is:
+
+ RecCounter = (size_t)((double)log((double)rbound_)/log(2.));//2^RecCounter < rbound_ <=2^(RecCounter+1)
+
+When rbound_ is equal to zero the result of log function is -inf (double[8
+bytes]).
+
+When we cast -inf to size_t (unsigned int[4 bytes]) on i386 and amd64, the
+result is zero.
+
+In the same situation on mips architecture, cast is done through TRUNC.W.D
+instruction.
+
+For this instruction, if the source value is Infinity, NaN, or rounds to an
+integer outside the range -2^31 to 2^31-1, the result cannot be represented
+correctly and an IEEE Invalid Operation condition exists. The result depends on
+the FP exception model currently active and the default result is 2^31-1
+(2147483647).
+
+Index: linbox-1.3.2/linbox/algorithms/rational-reconstruction-base.h
+===================================================================
+--- linbox-1.3.2.orig/linbox/algorithms/rational-reconstruction-base.h 2012-06-09 02:13:48.000000000 +0000
++++ linbox-1.3.2/linbox/algorithms/rational-reconstruction-base.h 2013-12-31 13:40:03.000000000 +0000
+@@ -73,7 +73,8 @@
+ RecCounter = (int)sqrt((double)rbound_);//RecCounter^2 < rbound_ <=(RecCounter+1)^2
+ }
+ else if (_meth == GEOMETRIC) {
+- RecCounter = (size_t) log((double)rbound_) ;//2^RecCounter < rbound_ <=2^(RecCounter+1)
++ if (rbound_!=0)
++ RecCounter = (size_t) log((double)rbound_) ;//2^RecCounter < rbound_ <=2^(RecCounter+1)
+ }
+ }
+
+@@ -85,7 +86,8 @@
+ RecCounter = (size_t)sqrt((double)rbound_);//RecCounter^2 < rbound_ <=(RecCounter+1)^2
+ }
+ else if (_meth == GEOMETRIC) {
+- RecCounter = (size_t)((double)log((double)rbound_)/log(2.));//2^RecCounter < rbound_ <=2^(RecCounter+1)
++ if (rbound_!=0)
++ RecCounter = (size_t)((double)log((double)rbound_)/log(2.));//2^RecCounter < rbound_ <=2^(RecCounter+1)
+ }
+
+ }
diff --git a/debian/patches/series b/debian/patches/series
index efc679d..4733501 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -3,3 +3,4 @@ soname.patch
fix-doc-path.patch
fix-gmp-detect.patch
linboxsage-link-iml.patch
+fix-RR-RecCounter.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/linbox.git
More information about the debian-science-commits
mailing list