hdf5/config
Ubuntu Developers 419e47e85e fix-unaligned-accesses
Package: libhdf5-100
Version: 1.10.0-patch1+docs-3
Tags: upstream patch
User: debian-sparc@lists.debian.org
Usertags: sparc64
X-Debbugs-Cc: debian-sparc@lists.debian.org, Ghislain Vaillant <ghisvail@gmail.com>
Control: affects -1 src:h5py
Hi,
Currently libhdf5-100 performs unaligned memory accesses on sparc64 in
certain cases, and this is causing the latest version of h5py to FTBFS
due to the test suite being killed with SIGBUS when doing vlen-related
tests (the tests in question being new in the latest upstream version).
On investigating, there are two issues:

 1. NO_ALIGNMENT_RESTRICTIONS is being defined on sparc64. GCC is
    sufficiently smart to notice that the test program run when
    configuring is performing unaligned accesses, and so instead of
    using the usual multi-byte load instructions (which require the
    address to be aligned), it expands it out into individual byte
    loads, and therefore the test actually succeeds. This is only
    because GCC can statically determine that the address is unaligned,
    and therefore tries to be helpful (since it knows using multi-byte
    loads will never work), whereas for a general address it will assume
    the address is aligned and emit a single multi-byte load.

    Adding in a few volatile qualifiers in the important places ensures
    that GCC can no longer statically prove the relevant addresses are
    unaligned, and therefore it uses the normal multi-byte load
    instructions and the test program will crash, so configure knows not
    to define NO_ALIGNMENT_RESTRICTIONS.

 2. Even with that fixed, H5T_vlen_reclaim_recurse needs fixing to
    ensure it doesn't perform unaligned accesses when not supported.

With the attached patch, h5py's test suite now passes again. Please feel
free to forward this patch upstream if you deem it acceptable.

Regards,
James

Gbp-Pq: Name fix-unaligned-accesses.patch
2022-05-14 03:32:24 +08:00
..
cmake fix-unaligned-accesses 2022-05-14 03:32:24 +08:00
cmake_ext_mod Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
site-specific Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
BlankForm Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
COPYING Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
Makefile.am.blank Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
apple Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
cce-fflags Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
cce-flags Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
commence.am Add option --with-flavor=<flavor-name> to configure 2022-05-14 03:32:24 +08:00
conclude.am Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
conclude_fc.am Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
cygwin Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
examples.am Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
freebsd Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
gnu-cxxflags Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
gnu-fflags Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
gnu-flags Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
ibm-aix Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
ibm-flags Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
intel-fflags Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
intel-flags Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
intel.cmake Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
linux-gnu Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
linux-gnuaout Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
linux-gnulibc1 Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
linux-gnulibc2 Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
lt_vers.am Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
pgi-fflags Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
pgi-flags Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00
solaris Import Upstream version 1.10.4+repack 2022-05-14 03:31:31 +08:00