You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
SIGABRT on 32bit armhf in [batch]<xsimd::batch<unsigned char>> #1260
(this line points at main patched by #1254 but the essential logic is the same in 14.0.0)
With defined(__ARM_NEON) && __ARM_ARCH >= 7 it seems to be assuming that armv7 always supports NEON, but apparently NEON is optional for v7.I'm not exactly sure that this assumption is what's triggering the SIGABRT reported here, but the log does refer to A = xsimd::neon.
So this machine is actually v8 not v7, and reports that it is "supposed" to support neon. So perhaps this SIGABRT is not directly a NEON issue.
In the light of the comment above, (successful with -march=armv7-a+fp), I think it might actually be the other way around: the SIGABRT is precisely a NEON issue, on 32-bit ARM.
If the 32-bit arm system doesn't claim to support neon then this code is not invoked. The fallback generic function is used instead, with no SIGABRT. The problem is only when 32-bit arm does claim to support neon.
This bug is still present in 14.1.0. This release fixed other problems, but not this 32-bit armhf issue, even after applying the final PR #1241 patch. A gdb backtrace of test_xsimd is
test_xsimd: ./include/xsimd/types/xsimd_batch.hpp:596: void xsimd::batch<T, A>::store_aligned(U*) const [with U = unsigned char; T = unsigned char; A = xsimd::neon]: Assertion `((reinterpret_cast<uintptr_t>(mem) % A::alignment()) == 0) && "store location is not properly aligned"' failed.
Program received signal SIGABRT, Aborted.
__libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47
warning: 47 ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S: No such file or directory
(gdb) bt
#0 __libc_do_syscall () at ../sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:47
#1 0xf7c6643e in __pthread_kill_implementation (threadid=4160614432, signo=signo@entry=6, no_tid=no_tid@entry=0) at pthread_kill.c:43
#2 0xf7c664bc in __pthread_kill_internal (threadid=<optimized out>, signo=6) at pthread_kill.c:89
#3 0xf7c2eef8 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#4 0xf7c1f2ae in __GI_abort () at abort.c:77
#5 0xf7c2a140 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0xbcc044 "((reinterpret_cast<uintptr_t>(mem) % A::alignment()) == 0) && \"store location is not properly aligned\"",
file=file@entry=0xbc8960 "./include/xsimd/types/xsimd_batch.hpp", line=line@entry=596, function=<optimized out>,
function@entry=0xbcbfd4 "void xsimd::batch<T, A>::store_aligned(U*) const [with U = unsigned char; T = unsigned char; A = xsimd::neon]") at assert.c:118
#6 0xf7c2a262 in __assert_fail (assertion=0xbcc044 "((reinterpret_cast<uintptr_t>(mem) % A::alignment()) == 0) && \"store location is not properly aligned\"",
file=0xbc8960 "./include/xsimd/types/xsimd_batch.hpp", line=596, function=0xbcbfd4 "void xsimd::batch<T, A>::store_aligned(U*) const [with U = unsigned char; T = unsigned char; A = xsimd::neon]")
at assert.c:127
#7 0x0064f3e4 in xsimd::batch<unsigned char, xsimd::neon>::store_aligned<unsigned char> (this=<optimized out>, mem=<optimized out>) at ./include/xsimd/types/xsimd_batch.hpp:596
#8 xsimd::kernel::swizzle<xsimd::neon, unsigned char, unsigned char, (unsigned char)8, (unsigned char)9, (unsigned char)10, (unsigned char)11, (unsigned char)12, (unsigned char)13, (unsigned char)14, (unsigned char)15, (unsigned char)8, (unsigned char)9, (unsigned char)10, (unsigned char)11, (unsigned char)12, (unsigned char)13, (unsigned char)14, (unsigned char)15> (self=...)
at ./include/xsimd/types/../arch/./xsimd_neon.hpp:3150
#9 xsimd::swizzle<unsigned char, xsimd::neon, unsigned char, (unsigned char)8, (unsigned char)9, (unsigned char)10, (unsigned char)11, (unsigned char)12, (unsigned char)13, (unsigned char)14, (unsigned char)15, (unsigned char)8, (unsigned char)9, (unsigned char)10, (unsigned char)11, (unsigned char)12, (unsigned char)13, (unsigned char)14, (unsigned char)15> (x=..., mask=...)
at ./include/xsimd/types/xsimd_api.hpp:2640
#10 xsimd::kernel::detail::reduce<xsimd::kernel::reduce_max<xsimd::neon, unsigned char>(xsimd::batch<unsigned char, xsimd::neon> const&, xsimd::common const&)::{lambda(xsimd::batch<unsigned char, xsimd::neon> const&, xsimd::batch<unsigned char, xsimd::neon> const&)#1}, xsimd::neon, unsigned char, 16u>(xsimd::kernel::reduce_max<xsimd::neon, unsigned char>(xsimd::batch<unsigned char, xsimd::neon> const&, xsimd::common const&)::{lambda(xsimd::batch<unsigned char, xsimd::neon> const&, xsimd::batch<unsigned char, xsimd::neon> const&)#1}, xsimd::batch<unsigned char, xsimd::neon> const&, std::integral_constant<unsigned int, 16u>) (
op=..., self=...) at ./include/xsimd/types/../arch/././common/xsimd_common_math.hpp:2140
#11 xsimd::kernel::reduce_max<xsimd::neon, unsigned char> (self=...) at ./include/xsimd/types/../arch/././common/xsimd_common_math.hpp:2149
#12 xsimd::reduce_max<unsigned char, xsimd::neon> (x=...) at ./include/xsimd/types/xsimd_api.hpp:1960
#13 batch_test<xsimd::batch<unsigned char, xsimd::neon> >::test_horizontal_operations (this=this@entry=0xfffeef50) at ./test/test_batch.cpp:832
#14 0x0059ae4c in DOCTEST_ANON_TMP_740<xsimd::batch<unsigned char> > () at ./test/test_batch.cpp:1040
#15 0x004c27a4 in doctest::Context::run (this=this@entry=0xfffef2e8) at /usr/include/doctest/doctest.h:7035
#16 0x004a7f38 in main (argc=<optimized out>, argv=<optimized out>) at /usr/include/doctest/doctest.h:7113
Looks like some alignment is still missing, applying #1374 to 14.2.0,
unless there are other alignment patches post-14.2.0 that should be included in the build.
This is in a default build that doesn't force the compile option -march=armv7-a+fp.
The error message here refers to U = float, the one I logged in the previous message was U = unsigned char.
Activity
drew-parsons commentedon Feb 18, 2026
Part of the issue could be in
xsimd/include/xsimd/config/xsimd_config.hpp
Line 362 in ec061dd
(this line points at main patched by #1254 but the essential logic is the same in 14.0.0)
With
defined(__ARM_NEON) && __ARM_ARCH >= 7it seems to be assuming that armv7 always supports NEON, but apparently NEON is optional for v7.I'm not exactly sure that this assumption is what's triggering the SIGABRT reported here, but the log does refer toA = xsimd::neon.There is some related discussion in a debian bug at https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1128257
drew-parsons commentedon Feb 18, 2026
I have lscpu output from the failing machine, logged at https://buildd.debian.org/status/fetch.php?pkg=xsimd&arch=armhf&ver=14.0.0-4&stamp=1771339739&raw=0
So this machine is actually v8 not v7, and reports that it is "supposed" to support neon. So perhaps this SIGABRT is not directly a NEON issue.
Following the advice of the debian gcc maintainer (debian Bug#1128257) I'll try testing with
-march=armv7-a+fp(the debian baseline for armhf is v7)drew-parsons commentedon Feb 19, 2026
armv8l may indicate a 32-bit ARM environment (chroot) on Aarch64, which might be relevant.
I can get xsimd 14.0.0 to build and test successfully in this armhf environment by forcing armv7 compliance with
-march=armv7-a+fpdrew-parsons commentedon Feb 20, 2026
In the light of the comment above, (successful with -march=armv7-a+fp), I think it might actually be the other way around: the SIGABRT is precisely a NEON issue, on 32-bit ARM.
If the 32-bit arm system doesn't claim to support neon then this code is not invoked. The fallback generic function is used instead, with no SIGABRT. The problem is only when 32-bit arm does claim to support neon.
drew-parsons commentedon May 2, 2026
This bug is still present in 14.1.0. This release fixed other problems, but not this 32-bit armhf issue, even after applying the final PR #1241 patch. A gdb backtrace of test_xsimd is
drew-parsons commentedon Jul 8, 2026
Looks like some alignment is still missing, applying #1374 to 14.2.0,
unless there are other alignment patches post-14.2.0 that should be included in the build.
This is in a default build that doesn't force the compile option
-march=armv7-a+fp.The error message here refers to
U = float, the one I logged in the previous message wasU = unsigned char.armhf build log at https://buildd.debian.org/status/fetch.php?pkg=xsimd&arch=armhf&ver=14.2.0-3&stamp=1783529142&raw=0