[Debian-astro-commits] [cpl] 01/02: Workround unligned access on armhf by not running an optimised loop there. Closes: #846094

Ole Streicher olebole at moszumanska.debian.org
Thu Mar 23 10:46:37 UTC 2017


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

olebole pushed a commit to branch master
in repository cpl.

commit 1654c4f5d72d768f40a9f1415697049e7704282f
Author: Ole Streicher <olebole at debian.org>
Date:   Thu Mar 23 11:42:12 2017 +0100

    Workround unligned access on armhf by not running an optimised loop there. Closes: #846094
---
 debian/changelog                                          |  7 +++++++
 .../cpl_mask_count_window_no_unaligned_access_armhf       | 15 +++++++++++++++
 debian/patches/series                                     |  1 +
 3 files changed, 23 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 99a34d0..a315d03 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+cpl (7.0-4) UNRELEASED; urgency=low
+
+  * Workround unligned access on armhf by not running an optimised loop
+    there. Closes: #846094
+
+ -- Iain Lane <iain at orangesquash.org.uk>  Mon, 28 Nov 2016 13:01:28 +0000
+
 cpl (7.0-3) unstable; urgency=medium
 
   [ Andreas Tille ]
diff --git a/debian/patches/cpl_mask_count_window_no_unaligned_access_armhf b/debian/patches/cpl_mask_count_window_no_unaligned_access_armhf
new file mode 100644
index 0000000..977906a
--- /dev/null
+++ b/debian/patches/cpl_mask_count_window_no_unaligned_access_armhf
@@ -0,0 +1,15 @@
+Description: Don't run a loop which causes unaligned access (SIGBUS) on armhf
+Author: Iain Lane <iain.lane at canonical.com>
+Forwarded: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=846094
+
+--- cpl-7.0.orig/cplcore/cpl_mask.c
++++ cpl-7.0/cplcore/cpl_mask.c
+@@ -1127,7 +1127,7 @@ cpl_size cpl_mask_count_window(const cpl
+ 
+     for (j = lly - 1; j < ury; j++, pi += self->nx) {
+         i = llx - 1;
+-#ifdef CPL_MASK_WORD
++#if defined (CPL_MASK_WORD) && !defined(__arm__)
+         /* FIXME: Should really ensure byte-wise iteration to word-boundary */
+         for (; i < llx - 1 + CPL_MASK_PAD2WORD2(llx - 1); i++) {
+             if (pi[i] != CPL_BINARY_0) count++;
diff --git a/debian/patches/series b/debian/patches/series
index 41137ef..31fed0f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -10,3 +10,4 @@ serial-tests
 reproducible_build.patch
 workaround_mips_ftbfs.patch
 fix_i386_failure.patch
+cpl_mask_count_window_no_unaligned_access_armhf

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



More information about the Debian-astro-commits mailing list