[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

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



On Fri, Apr 17, 2020 at 7:21 AM Andreas Tille <andreas@an3as.eu> 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


Reply to: