aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryan Newbold <bnewbold@robocracy.org>2017-09-30 21:40:19 -0700
committerBryan Newbold <bnewbold@robocracy.org>2017-09-30 21:42:15 -0700
commit12f0a0a1b21c1461b15e4d06cb7473014a7ef14f (patch)
treee0687c77e7eb83231bdee005c448019af899cdf3
parent99ab7ec5de1d9f616e07cdefd5b494277a955195 (diff)
downloadscm-12f0a0a1b21c1461b15e4d06cb7473014a7ef14f.zip
scm-12f0a0a1b21c1461b15e4d06cb7473014a7ef14f.tar.gz
patch: disable bigrecy() on 32-bit platforms
This temporary patch gets r4rstest.scm to pass on 32-bit platforms, which fixes FTBS (as tests are required for the package build).
-rw-r--r--debian/changelog6
-rw-r--r--debian/patches/bypass_bigrecy_32bit.patch26
-rw-r--r--debian/patches/series1
3 files changed, 33 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 6361b65..18ac5a8 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+scm (5f2-2) UNRELEASED; urgency=medium
+
+ * Temporary patch to fix 32-bit tests (and thus builds; Closes: #874112)
+
+ -- Bryan Newbold <bnewbold@robocracy.org> Sat, 30 Sep 2017 21:37:13 -0700
+
scm (5f2-1) unstable; urgency=medium
* New upstream release (Closes: #791958) with improved floating point
diff --git a/debian/patches/bypass_bigrecy_32bit.patch b/debian/patches/bypass_bigrecy_32bit.patch
new file mode 100644
index 0000000..276bc8c
--- /dev/null
+++ b/debian/patches/bypass_bigrecy_32bit.patch
@@ -0,0 +1,26 @@
+Description: Bypass bigrecy() optimization on 32-bit to fix test failure
+Author: Bryan Newbold <bnewbold@robocracy.org>
+Forwarded: yes
+--- a/scl.c
++++ b/scl.c
+@@ -132,12 +132,20 @@ void strrecy(str)
+ void bigrecy(bgnm)
+ SCM bgnm;
+ {
++/* As an emergency patch, only implement this GC optimization on specific
++ * 64-bit platforms.
++ * There is a "use-after-free" bug on 32-bit platforms, introduced as a
++ * regression between 5f1 and 5f2. --bnewbold (2017-09-30)
++ */
++#if defined(__ia64__) || defined(__powerpc64__) || defined(__x86_64__) \
++ || defined(__aarch64__)
+ if (IMP(bgnm) || !BIGP(bgnm)) return;
+ DEFER_INTS;
+ must_free(CHARS(bgnm), (sizet)NUMDIGS(bgnm)*sizeof(BIGDIG));
+ CAR(bgnm) = INUM0;
+ CDR(bgnm) = INUM0;
+ ALLOW_INTS;
++#endif
+ }
+
+ /* can convert to string accurately with bignums */
diff --git a/debian/patches/series b/debian/patches/series
index 102a07f..c48ccd1 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -4,3 +4,4 @@ texinfo5_fixes.patch
ppc64_short_int.patch
arm64_short_int.patch
hurd_maxpathlen.patch
+bypass_bigrecy_32bit.patch