[Debian-med-packaging] Bug#892223: seqan2: FTBFS on sparc64: 39 tests failed out of 403

Steve Langasek steve.langasek at canonical.com
Tue Dec 4 09:15:39 GMT 2018


Package: seqan2
Version: 2.4.0+dfsg-8
Followup-For: Bug #892223
User: ubuntu-devel at lists.ubuntu.com
Usertags: origin-ubuntu disco ubuntu-patch

Hello,

Unaligned access also affects armhf in certain circumstances (such as when
running on an arm64 kernel), which means this build failure was also
reproducible on armhf in Ubuntu:

  https://launchpad.net/ubuntu/+source/seqan2/2.4.0+dfsg-8ubuntu1/+build/15588212

What I don't know is why the sparc64 test failures in Debian are a superset
of those on armhf in Ubuntu, or why the tests fail with a segfault on
sparc64 instead of the expected sigbus.

Regardless, I think the attached patch is worth applying in Debian (and
upstream); it may fix the sparc64 build failure, or if it doesn't, it should
be a partial fix.

-- 
Steve Langasek                   Give me a lever long enough and a Free OS
Debian Developer                   to set it on, and I can move the world.
Ubuntu Developer                                   https://www.debian.org/
slangasek at ubuntu.com                                     vorlon at debian.org
-------------- next part --------------
diff -Nru seqan2-2.4.0+dfsg/debian/control seqan2-2.4.0+dfsg/debian/control
--- seqan2-2.4.0+dfsg/debian/control	2018-05-15 11:19:57.000000000 -0700
+++ seqan2-2.4.0+dfsg/debian/control	2018-12-04 01:06:20.000000000 -0800
@@ -1,6 +1,5 @@
 Source: seqan2
-Maintainer: Ubuntu Developers <ubuntu-devel-discuss at lists.ubuntu.com>
-XSBC-Original-Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
+Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
 Uploaders: Andreas Tille <tille at debian.org>,
            Michael R. Crusoe <michael.crusoe at gmail.com>,
            Kevin Murray <spam at kdmurray.id.au>
diff -Nru seqan2-2.4.0+dfsg/debian/patches/no-unaligned-access.patch seqan2-2.4.0+dfsg/debian/patches/no-unaligned-access.patch
--- seqan2-2.4.0+dfsg/debian/patches/no-unaligned-access.patch	1969-12-31 16:00:00.000000000 -0800
+++ seqan2-2.4.0+dfsg/debian/patches/no-unaligned-access.patch	2018-12-04 01:06:20.000000000 -0800
@@ -0,0 +1,22 @@
+Description: use alignment-safe buffer handling.
+ Currently we are using assignment to copy the contents of a variable of
+ arbitrary type into a buffer, but this is not portable because the buffer
+ address may not be aligned.  Use memcpy() instead, which should be
+ comparable performance ut alignment-safe.
+Author: Steve Langasek <steve.langasek at ubuntu.com>
+Bug-Debian: https://bugs.debian.org/892223
+
+Index: seqan2-2.4.0+dfsg/include/seqan/basic/basic_stream.h
+===================================================================
+--- seqan2-2.4.0+dfsg.orig/include/seqan/basic/basic_stream.h
++++ seqan2-2.4.0+dfsg/include/seqan/basic/basic_stream.h
+@@ -1200,7 +1200,8 @@
+ inline void
+ appendRawPodImpl(TTargetValue * &ptr, TValue const & val)
+ {
+-    *reinterpret_cast<TValue* &>(ptr)++ = val;
++    std::memcpy(ptr, &val, sizeof(TValue));
++    ptr += sizeof(TValue);
+ }
+ 
+ template <typename TTarget, typename TValue>
diff -Nru seqan2-2.4.0+dfsg/debian/patches/series seqan2-2.4.0+dfsg/debian/patches/series
--- seqan2-2.4.0+dfsg/debian/patches/series	2018-04-04 08:51:54.000000000 -0700
+++ seqan2-2.4.0+dfsg/debian/patches/series	2018-12-04 00:58:54.000000000 -0800
@@ -6,3 +6,4 @@
 install_fiona_illumina
 ctdVersion.patch
 fix_manpage_formatting.patch
+no-unaligned-access.patch


More information about the Debian-med-packaging mailing list