[polyml] 07/09: Backport GC ratio fix

James Clarke jrtc27-guest at moszumanska.debian.org
Tue Feb 2 21:21:00 UTC 2016


This is an automated email from the git hooks/post-receive script.

jrtc27-guest pushed a commit to branch master
in repository polyml.

commit 006d705344f7adf82f8c5df0909e3cabf914b9d7
Author: James Clarke <jrtc27 at jrtc27.com>
Date:   Sun Jan 31 18:33:44 2016 +0000

    Backport GC ratio fix
---
 debian/changelog                          |  3 +++
 debian/patches/fix-heap-ratio-assert.diff | 28 ++++++++++++++++++++++++++++
 debian/patches/series                     |  1 +
 3 files changed, 32 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index df9dba2..bbcb900 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -6,6 +6,9 @@ polyml (5.6-2) UNRELEASED; urgency=low
     and disable-compile-time-real-eval.diff. Avoids modifying the test driver,
     instead skipping the test if unsupported directly inside the test itself.
   * New patches (excluding soft-float-rounding.diff replacements):
+    - fix-heap-ratio-assert.diff: Backport upstream's fix to let the
+      calculated minimum heap size be the same as the desired value.
+      Previously it failed an assertion.
     - fix-script-args.diff: Backport upstream's fix so --script can be used
       with additional command-line arguments.
     - mips-abi.diff: Mark polyexport.o as CPIC on MIPS when code is
diff --git a/debian/patches/fix-heap-ratio-assert.diff b/debian/patches/fix-heap-ratio-assert.diff
new file mode 100644
index 0000000..8453a6c
--- /dev/null
+++ b/debian/patches/fix-heap-ratio-assert.diff
@@ -0,0 +1,28 @@
+Description: The calculated cost of the minimum heap size may be exactly the value desired.
+ In that case the previous code failed an assertion check.
+Origin: upstream, https://github.com/polyml/polyml/commit/489c7cab70a23961adbd782e96e58818b9bd87bb
+Author: David Matthews <dm at prolingua.co.uk>
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/libpolyml/heapsizing.cpp
++++ b/libpolyml/heapsizing.cpp
+@@ -576,8 +576,8 @@
+     if (sizeMin < minForAllocation) sizeMin = minForAllocation;
+ 
+     double costMin = costFunction(sizeMin, withSharing, true);
+-    if (costMin < userGCRatio)
+-        // If the cost of the minimum is below the target we
++    if (costMin <= userGCRatio)
++        // If the cost of the minimum is below or at the target we
+         // use that and don't need to look further.
+         isBounded = true;
+     else
+@@ -599,7 +599,7 @@
+                 sizeMin = sizeNext;
+                 costMin = cost;
+             }
+-            ASSERT(costMin > userGCRatio);
++            ASSERT(costMin >= userGCRatio);
+         }
+     }
+     ASSERT(sizeMin >= minHeapSize && sizeMin <= maxHeapSize);
diff --git a/debian/patches/series b/debian/patches/series
index b46a1ee..975960d 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -8,3 +8,4 @@ disable-compile-time-real-eval.diff
 mips-abi.diff
 unix-const-vec-unsigned.diff
 fix-script-args.diff
+fix-heap-ratio-assert.diff

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/polyml.git



More information about the debian-science-commits mailing list