tcpdns_test.c: runtime error: load of misaligned address for type 'uint64_t'
On Fedora 33 with gcc version 10.2.1 20201125 (Red Hat 10.2.1-9) and Buster GCC 8.3.0 with ASAN, I get following runtime errors:
[==========] Running 8 test(s).
[ RUN ] tcpdns_recv_one
tcpdns_test.c:481:8: runtime error: load of misaligned address 0x621000b4f10a for type 'uint64_t', which requires 8 byte alignment
0x621000b4f10a: note: pointer points here
00 00 00 08 e0 d9 8c c0 55 ec da b3 be be be be be be be be be be be be be be be be be be be be
^
[ OK ] tcpdns_recv_one
[ RUN ] tcpdns_recv_two
tcpdns_test.c:331:8: runtime error: load of misaligned address 0x6210012df50a for type 'uint64_t', which requires 8 byte alignment
0x6210012df50a: note: pointer points here
00 00 00 08 9d 1e 22 f3 c3 e2 6f 27 be be be be be be be be be be be be be be be be be be be be
^
[ OK ] tcpdns_recv_two
[ RUN ] tcpdns_noop
[ OK ] tcpdns_noop
[ RUN ] tcpdns_noresponse
[ OK ] tcpdns_noresponse
[ RUN ] tcpdns_recv_send
[ OK ] tcpdns_recv_send
[ RUN ] tcpdns_recv_half_send
[ OK ] tcpdns_recv_half_send
[ RUN ] tcpdns_half_recv_send
[ OK ] tcpdns_half_recv_send
[ RUN ] tcpdns_half_recv_half_send
[ OK ] tcpdns_half_recv_half_send
[==========] 8 test(s) run.
[ PASSED ] 8 test(s).
PASS tcpdns_test (exit status: 0)
Edited by Michal Nowak