Re: Bug#956324: Clustalo bus error on mipsel (Was: Bug#956324: python-biopython: FTBFS on mipsel)

Jeffrey Walton <[email protected]>
Newsgroups gmane.linux.debian.ports.mips,gmane.linux.debian.devel.mentors
Message-ID <CAH8yC8kLreLd1Rpz-xrKCxAKp9C9QRrcVmyuCsywPkHi7LtbjA@mail.gmail.com>
On Fri, Apr 17, 2020 at 7:21 AM Andreas Tille <[email protected]> wrote:
>
> Control: tags -1 help
>
> as it can be seen on the recent build log of clustalo on mips[1] the
> build fails with
>
> # Run additional test from python-biopython package to verify that
> # this will work as well
> src/clustalo -i debian/tests/biopython_testdata/f002 --guidetree-out temp_test.dnd -o temp_test.aln --outfmt clustal --force
> make[1]: *** [debian/rules:25: override_dh_auto_test-arch] Bus error

You can sometimes locate a bus error at build time with -Wcast-align.
At runtime you can usually locate them with -fsanitize=undefined.

On x86 -Wcast-align usually triggers when casting to/from floats and
doubles. I don't know what triggers on MIPS, bit it may include
integers. You should look for all calls that perform casts to/from
void* and uint8_t* with a dereference. I.e.,

    uint8_t y[8] = ...;
    double x = *(double*)y;

If MIPS is sensitive to alignment (beyond x86 slop), then something
like this will get you into trouble, too:

    uint8_t y[8] = ...;
    unsigned long x = *(unsigned long*)y;

I don't know about MIPS, but... I've experienced the problem with
long's on SPARCv8. SPARCv8 needs 8-byte alignments because they have a
specialized 64-bit move instruction. Or SPARCv8 needs an extra
compile/link switch that disables the 64-bit move. The option is
-xmemalign, which tells the toolchain what alignments can be assumed.

Jeff
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.