snap icon indicating copy to clipboard operation
snap copied to clipboard

unit_tests binary crashes on sparc64 due to unaligned access (Bus error)

Open glaubitz opened this issue 7 months ago • 0 comments

The unit_tests binary crashes on sparc64 on Linux due to unaligned access (Bus error):

./unit_tests
AffineGapTest:
- synthetic: [OK]

AffineGapVectorizedTest:
- equal strings: [OK]
- one deletion: [OK]
- long deletion: [OK]
- long insertion: [OK]
- synthetic: [OK]

EventTest:
- many waiters: [OK]
- single waiters: [OK]

LandauVishkinTest:
- equal strings: [OK]
- prefixes: [FAILED]
    lv.computeEditDistance("abcde", 5, "abcd", 4, 2) was 1, expected 0
    (tests/LandauVishkinTest.cpp:16)
- non-equal strings: make[1]: *** [debian/rules:16: override_dh_auto_test] Bus error

Full build log available in: https://buildd.debian.org/status/fetch.php?pkg=snap-aligner&arch=sparc64&ver=2.0.5%2Bdfsg-1&stamp=1757588432&raw=0

While big-endian targets such as sparc64 don't seem to be well supported at the moment in general, it is still a good idea to fix any unaligned access in C++ code to avoid performance penalties.

Access to SPARC machines for testing can be obtained through the GCC Compile Farm: https://gcc.gnu.org/wiki/CompileFarm

glaubitz avatar Sep 13 '25 07:09 glaubitz