lightning icon indicating copy to clipboard operation
lightning copied to clipboard

make check error on arm64 Fedora 39

Open grubles opened this issue 1 year ago • 4 comments

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

grubles avatar Feb 01 '24 22:02 grubles

--enable-rust it is needed? looks like that the tests is happening on C side

vincenzopalazzo avatar Feb 05 '24 09:02 vincenzopalazzo

No it's not AFAIK. I just wanted to show there isn't anything special about my build.

grubles avatar Feb 05 '24 14:02 grubles

Mh currently I am not able to reproduce on my raspberry-pi, I should try on my odroid when I find it

vincenzopalazzo avatar Feb 06 '24 20:02 vincenzopalazzo

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.

cdecker avatar Feb 21 '24 13:02 cdecker