make check error on arm64 Fedora 39
Fedora 39 on arm64. Occurs with both v23.11.2 and master using./configure --enable-rust.
VALGRIND=1 valgrind -q --error-exitcode=7 --track-origins=yes --leak-check=full --show-reachable=yes --errors-for-leak-kinds=all common/test/run-tal_arr_randomize > /dev/null
==151138== Source and destination overlap in memcpy(0x4d69f08, 0x4d69f08, 8)
==151138== at 0x48CB68C: __GI_memcpy (vg_replace_strmem.c:1147)
==151138== by 0x41B50B: tal_arr_randomize_ (pseudorand.c:84)
==151138== by 0x41BB07: main (run-tal_arr_randomize.c:166)
==151138==
make: *** [Makefile:750: unittest/common/test/run-tal_arr_randomize] Error 7
--enable-rust it is needed? looks like that the tests is happening on C side
No it's not AFAIK. I just wanted to show there isn't anything special about my build.
Mh currently I am not able to reproduce on my raspberry-pi, I should try on my odroid when I find it
This is likely just valgrind learning new tricks, including that overlapping memcpy source and destination may cause trouble. Furthermore, the memcpy source and destinations are actually being randomized, which would make this a very flaky error.
We might get away with a + 1 in on the iteration, or when setting j we could ensure that j != i in all cases, which as far as I can see is the only time those memcpy calls overlap.