Bug#945414: gcr: FTBFS on sparc64 due to 64bit memory access alignment issues
Gregor Riepl
onitake at gmail.com
Sun Nov 24 15:15:46 GMT 2019
Source: gcr
Version: 3.18.0-1
Severity: normal
User: debian-sparc at lists.debian.org
Usertags: sparc64
Dear Maintainer,
The package build of gcr currently fails for the sparc64 architecture due to
misaligned access to 64-bit memory, as can be seen in the build log:
https://buildd.debian.org/status/fetch.php?pkg=gcr&arch=sparc64&ver=3.34.0-1&stamp=1571748585&raw=0
The build errors do not directly break the build, but cause unit tests to
crash with a bus error, and will likely make the resulting library unusable.
The root of the problem are constructs like this, where value is a
const guchar * that can have arbitrary alignment:
*result = *((CK_ULONG*)value);
As an easy workaround, this can be replaced by:
memcpy(result, value, sizeof(CK_ULONG));
This will result in safe memory access, and is usualy optimised out by the
compiler, so there is no runtime cost.
I'm working on a patch that does this for all such constructs.
Regards,
Greg
-- System Information:
Debian Release: bullseye/sid
APT prefers unreleased
APT policy: (500, 'unreleased'), (500, 'unstable'), (1, 'experimental')
Architecture: sparc64
Kernel: Linux 5.3.0-2-sparc64
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
More information about the pkg-gnome-maintainers
mailing list