View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0008796 | GNUnet | messenger service | public | 2024-05-04 03:29 | 2024-06-08 12:03 |
Reporter | ulfvonbelow | Assigned To | thejackimonster | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | x86-64 | OS | Guix System | OS Version | a1d711c92e |
Product Version | 0.21.1 | ||||
Fixed in Version | 0.21.2 | ||||
Summary | 0008796: aligned member accesses to misaligned GNUNET_MESSENGER_RoomEntryRecord | ||||
Description | If one builds gnunet with --enable-sanitizer, and then uses that gnunet to build libgnunetchat, and runs the libgnunetchat tests with UBSAN_OPTIONS=print_stacktrace=1, they will see the attached test log. In summary, there are two places where unaligned accesses are occurring: in messenger_value_to_string in plugin_gnsrecord_messenger, and inside idx_of in container_multihashmap.c, called by libgnunetchat in handle_process_records in gnunet_chat_handle.c. The latter could be considered a bug in libgnunetchat, but the former is purely in gnunet. | ||||
Steps To Reproduce | 1. build and install gnunet 0.21.1 with --enable-sanitizer (recent patches will be required to make gnunet's test suite pass) 2. build libgnunetchat 0.3.1, run the test suite (the unaligned accesses in libgnunetchat itself will only show up if you have CFLAGS=-fsanitize=address,undefined like me, but the unaligned accesses in gnunet itself should show up either way) with UBSAN_OPTIONS=print_stacktrace=1 set in the test environment 3. observe attached output in meson-logs/testlog.txt | ||||
Additional Information | It doesn't seem like there's much we can do about the GNUNET_MESSENGER_RoomEntryRecord itself being unaligned, since it's presumably encapsulated inside another message. We can get gcc to safely handle unaligned member access by using GNUNET_PACKED in the struct definition, but while this will help with direct member accesses, it won't help with indirect member accesses (e.g. using the address of a member). The only solution I can see for those is to produce an aligned copy of the member, e.g. a copy of the GNUNET_MESSENGER_RoomEntryRecord.key member that requires 4-byte alignment. The first patch attached adds GNUNET_PACKED to the struct definition in gnunet, while the second patch attached uses an aligned temporary copy of the room key inside handle_process_records. This is at least enough to make the libgnunetchat tests pass, though I haven't tried using it further yet. | ||||
Tags | No tags attached. | ||||
Attached Files | libgnunetchat-test-log (43,185 bytes)
Log of Meson test suite run on 2024-05-03T18:18:39.495937 Inherited environment: HOME=/tmp/guix-build-libgnunetchat-0.3.1.drv-0/build/home NIX_BUILD_CORES=0 NIX_BUILD_TOP=/tmp/guix-build-libgnunetchat-0.3.1.drv-0 NIX_STORE=/gnu/store PATH=/gnu/store/vfd86q8gfzy2pa8pqnb6s7s31klyh2h1-meson-1.1.1/bin:/gnu/store/pwq46z68kd41xs5zs0h3rvq87d96b2qc-ninja-1.11.1/bin:/gnu/store/birp474dmshlr2f5ns9sifaj2kgc4ymv-pkg-config-0.29.2/bin:/gnu/store/di7r19jlrilz8lbslw2x4ipjq733hh29-gnunet-0.21.1/bin:/gnu/store/ncnjvwr36hv0vyvnfnx1j65z5lrjck0n-check-0.15.2/bin:/gnu/store/5qvr0pgnnwkz5169d3jp945l1ypfwn9c-libgcrypt-1.10.1/bin:/gnu/store/48cly0ylkf7d4amy0sxvwjvfizw9zkns-libextractor-1.13/bin:/gnu/store/rxjf4kvfsrjh2yqglazh0p2rdm6gjkqx-tar-1.34/bin:/gnu/store/r7pj8rjwlhd82q3bpvpvhnlk53sjqsjz-gzip-1.12/bin:/gnu/store/n9py6bqz2v65cl4dnfgz8vmw71ngimkc-bzip2-1.0.8/bin:/gnu/store/bpvpzhpa9pywh4kyc2ahy1knhr1rhwma-file-5.44/bin:/gnu/store/7l3975g273jmghxmg45rxg67njmqqdd4-diffutils-3.8/bin:/gnu/store/dmilzzmzh6pids0lfb53malq7xl2bdw7-patch-2.7.6/bin:/gnu/store/ww0cq88fyylbl5dqzip7jgiy2n8bgxg7-findutils-4.9.0/bin:/gnu/store/9japbknz3adhama5bmb9hwlh88xwc7x6-gawk-5.2.1/bin:/gnu/store/kshpsafs61qk4pqfr3lw1qcjxim1ivsb-sed-4.8/bin:/gnu/store/2rzz197wd1i58fjr80iabx9f4lirzh86-grep-3.8/bin:/gnu/store/2bbya7064s0vpnrj8iw4yx67xbjl781i-xz-5.2.8/bin:/gnu/store/8xic4zbk422zlbflyiq5s9jwqbpg6ms7-coreutils-9.1/bin:/gnu/store/7djvlz0q0pvqhrfy37agnkhvchncqi92-make-4.3/bin:/gnu/store/a7difvd1a4615yxy3xxx18x41s10qbi5-bash-minimal-5.1.16/bin:/gnu/store/yqh4k4pym79g475rnccl28q5v4rwpsrs-ld-wrapper-0/bin:/gnu/store/c6xw9qdda0wnxz4mz954kk0aaazjcgqc-binutils-2.38/bin:/gnu/store/khk0cz0hs8jxcr4x6mw8b2829ipn2vbj-gcc-11.3.0/bin:/gnu/store/33wrah0lwnk7b6n40j0n4z6099sk8bwg-glibc-2.35/bin:/gnu/store/33wrah0lwnk7b6n40j0n4z6099sk8bwg-glibc-2.35/sbin:/gnu/store/3ply173phaz4swm54agy7737sa6342iq-libgpg-error-1.45/bin PWD=/tmp/guix-build-libgnunetchat-0.3.1.drv-0 TEMP=/tmp/guix-build-libgnunetchat-0.3.1.drv-0 TEMPDIR=/tmp/guix-build-libgnunetchat-0.3.1.drv-0 TMP=/tmp/guix-build-libgnunetchat-0.3.1.drv-0 TMPDIR=/tmp/guix-build-libgnunetchat-0.3.1.drv-0 out=/gnu/store/3l03wsj6vysk7467cy7687rnx4ainp1s-libgnunetchat-0.3.1 CFLAGS='-fsanitize=address,undefined -ggdb3 -O2 -fno-omit-frame-pointer' CXXFLAGS='-ggdb3 -O2 -fno-omit-frame-pointer' SOURCE_DATE_EPOCH=1 GUIX_LD_WRAPPER_ALLOW_IMPURITIES=no PKG_CONFIG_PATH=/gnu/store/di7r19jlrilz8lbslw2x4ipjq733hh29-gnunet-0.21.1/lib/pkgconfig:/gnu/store/ncnjvwr36hv0vyvnfnx1j65z5lrjck0n-check-0.15.2/lib/pkgconfig:/gnu/store/b8k5d8kqkvj213m1z7kh6f9hvsjfw7mw-libsodium-1.0.18/lib/pkgconfig:/gnu/store/5qvr0pgnnwkz5169d3jp945l1ypfwn9c-libgcrypt-1.10.1/lib/pkgconfig:/gnu/store/48cly0ylkf7d4amy0sxvwjvfizw9zkns-libextractor-1.13/lib/pkgconfig:/gnu/store/bpvpzhpa9pywh4kyc2ahy1knhr1rhwma-file-5.44/lib/pkgconfig:/gnu/store/2bbya7064s0vpnrj8iw4yx67xbjl781i-xz-5.2.8/lib/pkgconfig:/gnu/store/3ply173phaz4swm54agy7737sa6342iq-libgpg-error-1.45/lib/pkgconfig C_INCLUDE_PATH=/gnu/store/di7r19jlrilz8lbslw2x4ipjq733hh29-gnunet-0.21.1/include:/gnu/store/ncnjvwr36hv0vyvnfnx1j65z5lrjck0n-check-0.15.2/include:/gnu/store/b8k5d8kqkvj213m1z7kh6f9hvsjfw7mw-libsodium-1.0.18/include:/gnu/store/5qvr0pgnnwkz5169d3jp945l1ypfwn9c-libgcrypt-1.10.1/include:/gnu/store/48cly0ylkf7d4amy0sxvwjvfizw9zkns-libextractor-1.13/include:/gnu/store/n9py6bqz2v65cl4dnfgz8vmw71ngimkc-bzip2-1.0.8/include:/gnu/store/bpvpzhpa9pywh4kyc2ahy1knhr1rhwma-file-5.44/include:/gnu/store/9japbknz3adhama5bmb9hwlh88xwc7x6-gawk-5.2.1/include:/gnu/store/2bbya7064s0vpnrj8iw4yx67xbjl781i-xz-5.2.8/include:/gnu/store/7djvlz0q0pvqhrfy37agnkhvchncqi92-make-4.3/include:/gnu/store/c6xw9qdda0wnxz4mz954kk0aaazjcgqc-binutils-2.38/include:/gnu/store/khk0cz0hs8jxcr4x6mw8b2829ipn2vbj-gcc-11.3.0/include:/gnu/store/33wrah0lwnk7b6n40j0n4z6099sk8bwg-glibc-2.35/include:/gnu/store/3ply173phaz4swm54agy7737sa6342iq-libgpg-error-1.45/include:/gnu/store/21hhpf7wgy4kqvzajcnvhgracb1lbv8n-linux-libre-headers-5.15.49/include CPLUS_INCLUDE_PATH=/gnu/store/di7r19jlrilz8lbslw2x4ipjq733hh29-gnunet-0.21.1/include:/gnu/store/ncnjvwr36hv0vyvnfnx1j65z5lrjck0n-check-0.15.2/include:/gnu/store/b8k5d8kqkvj213m1z7kh6f9hvsjfw7mw-libsodium-1.0.18/include:/gnu/store/5qvr0pgnnwkz5169d3jp945l1ypfwn9c-libgcrypt-1.10.1/include:/gnu/store/48cly0ylkf7d4amy0sxvwjvfizw9zkns-libextractor-1.13/include:/gnu/store/n9py6bqz2v65cl4dnfgz8vmw71ngimkc-bzip2-1.0.8/include:/gnu/store/bpvpzhpa9pywh4kyc2ahy1knhr1rhwma-file-5.44/include:/gnu/store/9japbknz3adhama5bmb9hwlh88xwc7x6-gawk-5.2.1/include:/gnu/store/2bbya7064s0vpnrj8iw4yx67xbjl781i-xz-5.2.8/include:/gnu/store/7djvlz0q0pvqhrfy37agnkhvchncqi92-make-4.3/include:/gnu/store/c6xw9qdda0wnxz4mz954kk0aaazjcgqc-binutils-2.38/include:/gnu/store/khk0cz0hs8jxcr4x6mw8b2829ipn2vbj-gcc-11.3.0/include/c++:/gnu/store/khk0cz0hs8jxcr4x6mw8b2829ipn2vbj-gcc-11.3.0/include:/gnu/store/33wrah0lwnk7b6n40j0n4z6099sk8bwg-glibc-2.35/include:/gnu/store/3ply173phaz4swm54agy7737sa6342iq-libgpg-error-1.45/include:/gnu/store/21hhpf7wgy4kqvzajcnvhgracb1lbv8n-linux-libre-headers-5.15.49/include LIBRARY_PATH=/gnu/store/vfd86q8gfzy2pa8pqnb6s7s31klyh2h1-meson-1.1.1/lib:/gnu/store/di7r19jlrilz8lbslw2x4ipjq733hh29-gnunet-0.21.1/lib:/gnu/store/ncnjvwr36hv0vyvnfnx1j65z5lrjck0n-check-0.15.2/lib:/gnu/store/b8k5d8kqkvj213m1z7kh6f9hvsjfw7mw-libsodium-1.0.18/lib:/gnu/store/5qvr0pgnnwkz5169d3jp945l1ypfwn9c-libgcrypt-1.10.1/lib:/gnu/store/48cly0ylkf7d4amy0sxvwjvfizw9zkns-libextractor-1.13/lib:/gnu/store/n9py6bqz2v65cl4dnfgz8vmw71ngimkc-bzip2-1.0.8/lib:/gnu/store/bpvpzhpa9pywh4kyc2ahy1knhr1rhwma-file-5.44/lib:/gnu/store/9japbknz3adhama5bmb9hwlh88xwc7x6-gawk-5.2.1/lib:/gnu/store/2bbya7064s0vpnrj8iw4yx67xbjl781i-xz-5.2.8/lib:/gnu/store/c6xw9qdda0wnxz4mz954kk0aaazjcgqc-binutils-2.38/lib:/gnu/store/33wrah0lwnk7b6n40j0n4z6099sk8bwg-glibc-2.35/lib:/gnu/store/rf567pvknl9qkh97yvl0yic4q0d0l1kn-glibc-2.35-static/lib:/gnu/store/7pg79wysi2ssyyi5i8849q9vpxprkbyv-glibc-utf8-locales-2.35/lib:/gnu/store/3ply173phaz4swm54agy7737sa6342iq-libgpg-error-1.45/lib GUIX_LOCPATH=/gnu/store/7pg79wysi2ssyyi5i8849q9vpxprkbyv-glibc-utf8-locales-2.35/lib/locale LC_ALL=en_US.utf8 UBSAN_OPTIONS=print_stacktrace=1 MESON_TESTTHREADS=1 ==================================== 1/4 ===================================== test: test_gnunet_chat_handle start time: 18:18:39 duration: 4.16s result: exit status 1 command: MALLOC_PERTURB_=160 LD_LIBRARY_PATH=/tmp/guix-build-libgnunetchat-0.3.1.drv-0/build/ /tmp/guix-build-libgnunetchat-0.3.1.drv-0/build/tests/test_gnunet_chat_handle.test ----------------------------------- stdout ----------------------------------- Running suite(s): Handle 80%: Checks: 5, Failures: 0, Errors: 1 ../source/tests/test_gnunet_chat_handle.c:115:E:Accounts:test_gnunet_chat_handle_accounts:0: (after this point) Test timeout expired ============================================================================== ==================================== 2/4 ===================================== test: test_gnunet_chat_lobby start time: 18:18:43 duration: 0.79s result: exit status 0 command: MALLOC_PERTURB_=191 LD_LIBRARY_PATH=/tmp/guix-build-libgnunetchat-0.3.1.drv-0/build/ /tmp/guix-build-libgnunetchat-0.3.1.drv-0/build/tests/test_gnunet_chat_lobby.test ----------------------------------- stdout ----------------------------------- Running suite(s): Lobby 100%: Checks: 2, Failures: 0, Errors: 0 ----------------------------------- stderr ----------------------------------- plugin_gnsrecord_messenger.c:62:20: runtime error: member access within misaligned address 0x61100000211a for type 'const struct GNUNET_MESSENGER_RoomEntryRecord', which requires 4 byte alignment 0x61100000211a: note: pointer points here 00 01 00 16 a5 72 12 57 f8 28 7b 19 7c 33 65 1c 61 a0 e2 e9 7a df a6 1f 7a 93 03 9d 5f 2a d9 21 ^ #0 0x7ffff2783c3e in messenger_value_to_string /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/plugin/messenger/plugin_gnsrecord_messenger.c:62 #1 0x7ffff6dcb8b6 in GNUNET_GNSRECORD_value_to_string /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/gnsrecord/gnsrecord.c:166 #2 0x7ffff6dce318 in GNUNET_GNSRECORD_records_deserialize /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/gnsrecord/gnsrecord_serialization.c:281 #3 0x7ffff61251fe in check_result /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/service/namestore/namestore_api_monitor.c:193 #4 0x7ffff707f609 in GNUNET_MQ_handle_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mq.c:238 #5 0x7ffff707fe13 in GNUNET_MQ_inject_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mq.c:192 #6 0x7ffff6fc248d in recv_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/client.c:347 #7 0x7ffff707bf76 in GNUNET_MST_from_buffer /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mst.c:222 #8 0x7ffff6fc2c29 in receive_ready /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/client.c:447 #9 0x7ffff70c86a3 in GNUNET_SCHEDULER_do_work /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:2137 #10 0x7ffff70cb919 in select_loop /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:2436 #11 0x7ffff70cb919 in GNUNET_SCHEDULER_run /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:738 #12 0x7ffff70aaedb in GNUNET_PROGRAM_run2 /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/program.c:381 #13 0x7ffff70ac470 in GNUNET_PROGRAM_run /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/program.c:408 #14 0x403016 in test_gnunet_chat_lobby_join_fn ../source/tests/test_gnunet_chat_lobby.c:247 #15 0x7ffff7e7e11c in tcase_run_tfun_fork /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:497 #16 0x7ffff7e7e11c in srunner_iterate_tcase_tfuns /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:256 #17 0x7ffff7e7e11c in srunner_run_tcase /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:402 #18 0x7ffff7e7e11c in srunner_iterate_suites /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:222 #19 0x7ffff7e7e11c in srunner_run_tagged /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:814 #20 0x4022c3 in main ../source/tests/test_gnunet_chat_lobby.c:254 #21 0x7ffff622c236 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #22 0x7ffff622c2f1 in __libc_start_main_impl ../csu/libc-start.c:392 #23 0x402330 in _start (/tmp/guix-build-libgnunetchat-0.3.1.drv-0/build/tests/test_gnunet_chat_lobby.test+0x402330) plugin_gnsrecord_messenger.c:64:56: runtime error: member access within misaligned address 0x61100000211a for type 'const struct GNUNET_MESSENGER_RoomEntryRecord', which requires 4 byte alignment 0x61100000211a: note: pointer points here 00 01 00 16 a5 72 12 57 f8 28 7b 19 7c 33 65 1c 61 a0 e2 e9 7a df a6 1f 7a 93 03 9d 5f 2a d9 21 ^ #0 0x7ffff2783c93 in messenger_value_to_string /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/plugin/messenger/plugin_gnsrecord_messenger.c:64 #1 0x7ffff6dcb8b6 in GNUNET_GNSRECORD_value_to_string /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/gnsrecord/gnsrecord.c:166 #2 0x7ffff6dce318 in GNUNET_GNSRECORD_records_deserialize /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/gnsrecord/gnsrecord_serialization.c:281 #3 0x7ffff61251fe in check_result /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/service/namestore/namestore_api_monitor.c:193 #4 0x7ffff707f609 in GNUNET_MQ_handle_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mq.c:238 #5 0x7ffff707fe13 in GNUNET_MQ_inject_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mq.c:192 #6 0x7ffff6fc248d in recv_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/client.c:347 #7 0x7ffff707bf76 in GNUNET_MST_from_buffer /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mst.c:222 #8 0x7ffff6fc2c29 in receive_ready /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/client.c:447 #9 0x7ffff70c86a3 in GNUNET_SCHEDULER_do_work /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:2137 #10 0x7ffff70cb919 in select_loop /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:2436 #11 0x7ffff70cb919 in GNUNET_SCHEDULER_run /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:738 #12 0x7ffff70aaedb in GNUNET_PROGRAM_run2 /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/program.c:381 #13 0x7ffff70ac470 in GNUNET_PROGRAM_run /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/program.c:408 #14 0x403016 in test_gnunet_chat_lobby_join_fn ../source/tests/test_gnunet_chat_lobby.c:247 #15 0x7ffff7e7e11c in tcase_run_tfun_fork /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:497 #16 0x7ffff7e7e11c in srunner_iterate_tcase_tfuns /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:256 #17 0x7ffff7e7e11c in srunner_run_tcase /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:402 #18 0x7ffff7e7e11c in srunner_iterate_suites /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:222 #19 0x7ffff7e7e11c in srunner_run_tagged /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:814 #20 0x4022c3 in main ../source/tests/test_gnunet_chat_lobby.c:254 #21 0x7ffff622c236 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #22 0x7ffff622c2f1 in __libc_start_main_impl ../csu/libc-start.c:392 #23 0x402330 in _start (/tmp/guix-build-libgnunetchat-0.3.1.drv-0/build/tests/test_gnunet_chat_lobby.test+0x402330) ============================================================================== ==================================== 3/4 ===================================== test: test_gnunet_chat_file start time: 18:18:44 duration: 0.46s result: exit status 0 command: MALLOC_PERTURB_=6 LD_LIBRARY_PATH=/tmp/guix-build-libgnunetchat-0.3.1.drv-0/build/ /tmp/guix-build-libgnunetchat-0.3.1.drv-0/build/tests/test_gnunet_chat_file.test ----------------------------------- stdout ----------------------------------- Running suite(s): File 100%: Checks: 1, Failures: 0, Errors: 0 ----------------------------------- stderr ----------------------------------- crypto_symmetric.c:140:8: runtime error: variable length array bound evaluates to non-positive value 0 #0 0x7ffff6fae5b6 in GNUNET_CRYPTO_symmetric_encrypt /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/crypto_symmetric.c:140 #1 0x7ffff5b54eb5 in GNUNET_FS_tree_encoder_next /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/service/fs/fs_tree.c:374 #2 0x7ffff5b21543 in publish_content /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/service/fs/fs_publish.c:685 #3 0x7ffff707f791 in GNUNET_MQ_handle_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mq.c:242 #4 0x7ffff707fe13 in GNUNET_MQ_inject_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mq.c:192 #5 0x7ffff6fc248d in recv_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/client.c:347 #6 0x7ffff707bf76 in GNUNET_MST_from_buffer /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mst.c:222 #7 0x7ffff6fc2c29 in receive_ready /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/client.c:447 #8 0x7ffff70c86a3 in GNUNET_SCHEDULER_do_work /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:2137 #9 0x7ffff70cb919 in select_loop /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:2436 #10 0x7ffff70cb919 in GNUNET_SCHEDULER_run /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:738 #11 0x7ffff70aaedb in GNUNET_PROGRAM_run2 /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/program.c:381 #12 0x7ffff70ac470 in GNUNET_PROGRAM_run /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/program.c:408 #13 0x4030b6 in test_gnunet_chat_file_send_fn ../source/tests/test_gnunet_chat_file.c:215 #14 0x7ffff7e7e11c in tcase_run_tfun_fork /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:497 #15 0x7ffff7e7e11c in srunner_iterate_tcase_tfuns /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:256 #16 0x7ffff7e7e11c in srunner_run_tcase /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:402 #17 0x7ffff7e7e11c in srunner_iterate_suites /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:222 #18 0x7ffff7e7e11c in srunner_run_tagged /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:814 #19 0x4022f3 in main ../source/tests/test_gnunet_chat_file.c:221 #20 0x7ffff622c236 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #21 0x7ffff622c2f1 in __libc_start_main_impl ../csu/libc-start.c:392 #22 0x402360 in _start (/tmp/guix-build-libgnunetchat-0.3.1.drv-0/build/tests/test_gnunet_chat_file.test+0x402360) plugin_gnsrecord_messenger.c:62:20: runtime error: member access within misaligned address 0x61300000095b for type 'const struct GNUNET_MESSENGER_RoomEntryRecord', which requires 4 byte alignment 0x61300000095b: note: pointer points here 00 01 00 16 a5 72 12 57 f8 28 7b 19 7c 33 65 1c 61 a0 e2 e9 7a df a6 1f 7a 93 03 9d 5f 2a d9 21 ^ #0 0x7fffec37ac3e (/gnu/store/di7r19jlrilz8lbslw2x4ipjq733hh29-gnunet-0.21.1/lib/gnunet/libgnunet_plugin_gnsrecord_messenger.so+0x4c3e) #1 0x7ffff6dcb8b6 in GNUNET_GNSRECORD_value_to_string /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/gnsrecord/gnsrecord.c:166 #2 0x7ffff6dce318 in GNUNET_GNSRECORD_records_deserialize /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/gnsrecord/gnsrecord_serialization.c:281 #3 0x7ffff61251fe in check_result /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/service/namestore/namestore_api_monitor.c:193 #4 0x7ffff707f609 in GNUNET_MQ_handle_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mq.c:238 #5 0x7ffff707fe13 in GNUNET_MQ_inject_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mq.c:192 #6 0x7ffff6fc248d in recv_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/client.c:347 #7 0x7ffff707bf76 in GNUNET_MST_from_buffer /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mst.c:222 #8 0x7ffff6fc2c29 in receive_ready /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/client.c:447 #9 0x7ffff70c86a3 in GNUNET_SCHEDULER_do_work /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:2137 #10 0x7ffff70cb919 in select_loop /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:2436 #11 0x7ffff70cb919 in GNUNET_SCHEDULER_run /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:738 #12 0x7ffff70aaedb in GNUNET_PROGRAM_run2 /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/program.c:381 #13 0x7ffff70ac470 in GNUNET_PROGRAM_run /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/program.c:408 #14 0x4030b6 in test_gnunet_chat_file_send_fn ../source/tests/test_gnunet_chat_file.c:215 #15 0x7ffff7e7e11c in tcase_run_tfun_fork /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:497 #16 0x7ffff7e7e11c in srunner_iterate_tcase_tfuns /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:256 #17 0x7ffff7e7e11c in srunner_run_tcase /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:402 #18 0x7ffff7e7e11c in srunner_iterate_suites /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:222 #19 0x7ffff7e7e11c in srunner_run_tagged /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:814 #20 0x4022f3 in main ../source/tests/test_gnunet_chat_file.c:221 #21 0x7ffff622c236 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #22 0x7ffff622c2f1 in __libc_start_main_impl ../csu/libc-start.c:392 #23 0x402360 in _start (/tmp/guix-build-libgnunetchat-0.3.1.drv-0/build/tests/test_gnunet_chat_file.test+0x402360) plugin_gnsrecord_messenger.c:64:56: runtime error: member access within misaligned address 0x61300000095b for type 'const struct GNUNET_MESSENGER_RoomEntryRecord', which requires 4 byte alignment 0x61300000095b: note: pointer points here 00 01 00 16 a5 72 12 57 f8 28 7b 19 7c 33 65 1c 61 a0 e2 e9 7a df a6 1f 7a 93 03 9d 5f 2a d9 21 ^ #0 0x7fffec37ac93 (/gnu/store/di7r19jlrilz8lbslw2x4ipjq733hh29-gnunet-0.21.1/lib/gnunet/libgnunet_plugin_gnsrecord_messenger.so+0x4c93) #1 0x7ffff6dcb8b6 in GNUNET_GNSRECORD_value_to_string /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/gnsrecord/gnsrecord.c:166 #2 0x7ffff6dce318 in GNUNET_GNSRECORD_records_deserialize /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/gnsrecord/gnsrecord_serialization.c:281 #3 0x7ffff61251fe in check_result /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/service/namestore/namestore_api_monitor.c:193 #4 0x7ffff707f609 in GNUNET_MQ_handle_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mq.c:238 #5 0x7ffff707fe13 in GNUNET_MQ_inject_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mq.c:192 #6 0x7ffff6fc248d in recv_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/client.c:347 #7 0x7ffff707bf76 in GNUNET_MST_from_buffer /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mst.c:222 #8 0x7ffff6fc2c29 in receive_ready /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/client.c:447 #9 0x7ffff70c86a3 in GNUNET_SCHEDULER_do_work /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:2137 #10 0x7ffff70cb919 in select_loop /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:2436 #11 0x7ffff70cb919 in GNUNET_SCHEDULER_run /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:738 #12 0x7ffff70aaedb in GNUNET_PROGRAM_run2 /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/program.c:381 #13 0x7ffff70ac470 in GNUNET_PROGRAM_run /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/program.c:408 #14 0x4030b6 in test_gnunet_chat_file_send_fn ../source/tests/test_gnunet_chat_file.c:215 #15 0x7ffff7e7e11c in tcase_run_tfun_fork /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:497 #16 0x7ffff7e7e11c in srunner_iterate_tcase_tfuns /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:256 #17 0x7ffff7e7e11c in srunner_run_tcase /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:402 #18 0x7ffff7e7e11c in srunner_iterate_suites /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:222 #19 0x7ffff7e7e11c in srunner_run_tagged /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:814 #20 0x4022f3 in main ../source/tests/test_gnunet_chat_file.c:221 #21 0x7ffff622c236 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #22 0x7ffff622c2f1 in __libc_start_main_impl ../csu/libc-start.c:392 #23 0x402360 in _start (/tmp/guix-build-libgnunetchat-0.3.1.drv-0/build/tests/test_gnunet_chat_file.test+0x402360) ../source/src/gnunet_chat_handle.c:1005:41: runtime error: member access within misaligned address 0x61300000095b for type 'const struct GNUNET_MESSENGER_RoomEntryRecord', which requires 4 byte alignment 0x61300000095b: note: pointer points here 00 01 00 16 a5 72 12 57 f8 28 7b 19 7c 33 65 1c 61 a0 e2 e9 7a df a6 1f 7a 93 03 9d 5f 2a d9 21 ^ #0 0x7ffff7f1ccf7 in handle_process_records ../source/src/gnunet_chat_handle.c:1005 #1 0x7ffff7f1cf70 in on_monitor_namestore_record ../source/src/gnunet_chat_handle_intern.c:763 #2 0x7ffff6124859 in handle_result /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/service/namestore/namestore_api_monitor.c:245 #3 0x7ffff707f791 in GNUNET_MQ_handle_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mq.c:242 #4 0x7ffff707fe13 in GNUNET_MQ_inject_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mq.c:192 #5 0x7ffff6fc248d in recv_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/client.c:347 #6 0x7ffff707bf76 in GNUNET_MST_from_buffer /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mst.c:222 #7 0x7ffff6fc2c29 in receive_ready /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/client.c:447 #8 0x7ffff70c86a3 in GNUNET_SCHEDULER_do_work /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:2137 #9 0x7ffff70cb919 in select_loop /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:2436 #10 0x7ffff70cb919 in GNUNET_SCHEDULER_run /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:738 #11 0x7ffff70aaedb in GNUNET_PROGRAM_run2 /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/program.c:381 #12 0x7ffff70ac470 in GNUNET_PROGRAM_run /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/program.c:408 #13 0x4030b6 in test_gnunet_chat_file_send_fn ../source/tests/test_gnunet_chat_file.c:215 #14 0x7ffff7e7e11c in tcase_run_tfun_fork /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:497 #15 0x7ffff7e7e11c in srunner_iterate_tcase_tfuns /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:256 #16 0x7ffff7e7e11c in srunner_run_tcase /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:402 #17 0x7ffff7e7e11c in srunner_iterate_suites /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:222 #18 0x7ffff7e7e11c in srunner_run_tagged /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:814 #19 0x4022f3 in main ../source/tests/test_gnunet_chat_file.c:221 #20 0x7ffff622c236 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #21 0x7ffff622c2f1 in __libc_start_main_impl ../csu/libc-start.c:392 #22 0x402360 in _start (/tmp/guix-build-libgnunetchat-0.3.1.drv-0/build/tests/test_gnunet_chat_file.test+0x402360) container_multihashmap.c:268:11: runtime error: load of misaligned address 0x61300000097b for type 'unsigned int', which requires 4 byte alignment 0x61300000097b: note: pointer points here 4d 02 2b 7e 93 ba db 09 c4 44 7f 7c 2f ef 1d 44 1e 6d 05 57 a3 c5 06 8d 02 7b 1c 3d d2 d6 7f 0a ^ #0 0x7ffff6fefc84 in idx_of /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/container_multihashmap.c:268 #1 0x7ffff6fefc84 in GNUNET_CONTAINER_multihashmap_get /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/container_multihashmap.c:287 #2 0x7ffff7f1c9ce in handle_process_records ../source/src/gnunet_chat_handle.c:1005 #3 0x7ffff7f1cf70 in on_monitor_namestore_record ../source/src/gnunet_chat_handle_intern.c:763 #4 0x7ffff6124859 in handle_result /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/service/namestore/namestore_api_monitor.c:245 #5 0x7ffff707f791 in GNUNET_MQ_handle_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mq.c:242 #6 0x7ffff707fe13 in GNUNET_MQ_inject_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mq.c:192 #7 0x7ffff6fc248d in recv_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/client.c:347 #8 0x7ffff707bf76 in GNUNET_MST_from_buffer /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mst.c:222 #9 0x7ffff6fc2c29 in receive_ready /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/client.c:447 #10 0x7ffff70c86a3 in GNUNET_SCHEDULER_do_work /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:2137 #11 0x7ffff70cb919 in select_loop /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:2436 #12 0x7ffff70cb919 in GNUNET_SCHEDULER_run /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:738 #13 0x7ffff70aaedb in GNUNET_PROGRAM_run2 /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/program.c:381 #14 0x7ffff70ac470 in GNUNET_PROGRAM_run /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/program.c:408 #15 0x4030b6 in test_gnunet_chat_file_send_fn ../source/tests/test_gnunet_chat_file.c:215 #16 0x7ffff7e7e11c in tcase_run_tfun_fork /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:497 #17 0x7ffff7e7e11c in srunner_iterate_tcase_tfuns /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:256 #18 0x7ffff7e7e11c in srunner_run_tcase /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:402 #19 0x7ffff7e7e11c in srunner_iterate_suites /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:222 #20 0x7ffff7e7e11c in srunner_run_tagged /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:814 #21 0x4022f3 in main ../source/tests/test_gnunet_chat_file.c:221 #22 0x7ffff622c236 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #23 0x7ffff622c2f1 in __libc_start_main_impl ../csu/libc-start.c:392 #24 0x402360 in _start (/tmp/guix-build-libgnunetchat-0.3.1.drv-0/build/tests/test_gnunet_chat_file.test+0x402360) ============================================================================== ==================================== 4/4 ===================================== test: test_gnunet_chat_message start time: 18:18:44 duration: 0.43s result: exit status 0 command: MALLOC_PERTURB_=243 LD_LIBRARY_PATH=/tmp/guix-build-libgnunetchat-0.3.1.drv-0/build/ /tmp/guix-build-libgnunetchat-0.3.1.drv-0/build/tests/test_gnunet_chat_message.test ----------------------------------- stdout ----------------------------------- Running suite(s): Message 100%: Checks: 1, Failures: 0, Errors: 0 ----------------------------------- stderr ----------------------------------- plugin_gnsrecord_messenger.c:62:20: runtime error: member access within misaligned address 0x613000000cdb for type 'const struct GNUNET_MESSENGER_RoomEntryRecord', which requires 4 byte alignment 0x613000000cdb: note: pointer points here 00 01 00 16 a5 72 12 57 f8 28 7b 19 7c 33 65 1c 61 a0 e2 e9 7a df a6 1f 7a 93 03 9d 5f 2a d9 21 ^ #0 0x7ffff2793c3e in messenger_value_to_string /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/plugin/messenger/plugin_gnsrecord_messenger.c:62 #1 0x7ffff6dcb8b6 in GNUNET_GNSRECORD_value_to_string /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/gnsrecord/gnsrecord.c:166 #2 0x7ffff6dce318 in GNUNET_GNSRECORD_records_deserialize /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/gnsrecord/gnsrecord_serialization.c:281 #3 0x7ffff61251fe in check_result /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/service/namestore/namestore_api_monitor.c:193 #4 0x7ffff707f609 in GNUNET_MQ_handle_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mq.c:238 #5 0x7ffff707fe13 in GNUNET_MQ_inject_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mq.c:192 #6 0x7ffff6fc248d in recv_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/client.c:347 #7 0x7ffff707bf76 in GNUNET_MST_from_buffer /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mst.c:222 #8 0x7ffff6fc2c29 in receive_ready /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/client.c:447 #9 0x7ffff70c86a3 in GNUNET_SCHEDULER_do_work /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:2137 #10 0x7ffff70cb919 in select_loop /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:2436 #11 0x7ffff70cb919 in GNUNET_SCHEDULER_run /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:738 #12 0x7ffff70aaedb in GNUNET_PROGRAM_run2 /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/program.c:381 #13 0x7ffff70ac470 in GNUNET_PROGRAM_run /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/program.c:408 #14 0x402bc6 in test_gnunet_chat_message_text_fn ../source/tests/test_gnunet_chat_message.c:136 #15 0x7ffff7e7e11c in tcase_run_tfun_fork /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:497 #16 0x7ffff7e7e11c in srunner_iterate_tcase_tfuns /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:256 #17 0x7ffff7e7e11c in srunner_run_tcase /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:402 #18 0x7ffff7e7e11c in srunner_iterate_suites /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:222 #19 0x7ffff7e7e11c in srunner_run_tagged /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:814 #20 0x4022e3 in main ../source/tests/test_gnunet_chat_message.c:142 #21 0x7ffff622c236 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #22 0x7ffff622c2f1 in __libc_start_main_impl ../csu/libc-start.c:392 #23 0x402350 in _start (/tmp/guix-build-libgnunetchat-0.3.1.drv-0/build/tests/test_gnunet_chat_message.test+0x402350) plugin_gnsrecord_messenger.c:64:56: runtime error: member access within misaligned address 0x613000000cdb for type 'const struct GNUNET_MESSENGER_RoomEntryRecord', which requires 4 byte alignment 0x613000000cdb: note: pointer points here 00 01 00 16 a5 72 12 57 f8 28 7b 19 7c 33 65 1c 61 a0 e2 e9 7a df a6 1f 7a 93 03 9d 5f 2a d9 21 ^ #0 0x7ffff2793c93 in messenger_value_to_string /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/plugin/messenger/plugin_gnsrecord_messenger.c:64 #1 0x7ffff6dcb8b6 in GNUNET_GNSRECORD_value_to_string /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/gnsrecord/gnsrecord.c:166 #2 0x7ffff6dce318 in GNUNET_GNSRECORD_records_deserialize /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/gnsrecord/gnsrecord_serialization.c:281 #3 0x7ffff61251fe in check_result /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/service/namestore/namestore_api_monitor.c:193 #4 0x7ffff707f609 in GNUNET_MQ_handle_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mq.c:238 #5 0x7ffff707fe13 in GNUNET_MQ_inject_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mq.c:192 #6 0x7ffff6fc248d in recv_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/client.c:347 #7 0x7ffff707bf76 in GNUNET_MST_from_buffer /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mst.c:222 #8 0x7ffff6fc2c29 in receive_ready /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/client.c:447 #9 0x7ffff70c86a3 in GNUNET_SCHEDULER_do_work /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:2137 #10 0x7ffff70cb919 in select_loop /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:2436 #11 0x7ffff70cb919 in GNUNET_SCHEDULER_run /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:738 #12 0x7ffff70aaedb in GNUNET_PROGRAM_run2 /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/program.c:381 #13 0x7ffff70ac470 in GNUNET_PROGRAM_run /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/program.c:408 #14 0x402bc6 in test_gnunet_chat_message_text_fn ../source/tests/test_gnunet_chat_message.c:136 #15 0x7ffff7e7e11c in tcase_run_tfun_fork /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:497 #16 0x7ffff7e7e11c in srunner_iterate_tcase_tfuns /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:256 #17 0x7ffff7e7e11c in srunner_run_tcase /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:402 #18 0x7ffff7e7e11c in srunner_iterate_suites /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:222 #19 0x7ffff7e7e11c in srunner_run_tagged /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:814 #20 0x4022e3 in main ../source/tests/test_gnunet_chat_message.c:142 #21 0x7ffff622c236 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #22 0x7ffff622c2f1 in __libc_start_main_impl ../csu/libc-start.c:392 #23 0x402350 in _start (/tmp/guix-build-libgnunetchat-0.3.1.drv-0/build/tests/test_gnunet_chat_message.test+0x402350) ../source/src/gnunet_chat_handle.c:1005:41: runtime error: member access within misaligned address 0x613000000cdb for type 'const struct GNUNET_MESSENGER_RoomEntryRecord', which requires 4 byte alignment 0x613000000cdb: note: pointer points here 00 01 00 16 a5 72 12 57 f8 28 7b 19 7c 33 65 1c 61 a0 e2 e9 7a df a6 1f 7a 93 03 9d 5f 2a d9 21 ^ #0 0x7ffff7f1ccf7 in handle_process_records ../source/src/gnunet_chat_handle.c:1005 #1 0x7ffff7f1cf70 in on_monitor_namestore_record ../source/src/gnunet_chat_handle_intern.c:763 #2 0x7ffff6124859 in handle_result /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/service/namestore/namestore_api_monitor.c:245 #3 0x7ffff707f791 in GNUNET_MQ_handle_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mq.c:242 #4 0x7ffff707fe13 in GNUNET_MQ_inject_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mq.c:192 #5 0x7ffff6fc248d in recv_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/client.c:347 #6 0x7ffff707bf76 in GNUNET_MST_from_buffer /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mst.c:222 #7 0x7ffff6fc2c29 in receive_ready /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/client.c:447 #8 0x7ffff70c86a3 in GNUNET_SCHEDULER_do_work /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:2137 #9 0x7ffff70cb919 in select_loop /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:2436 #10 0x7ffff70cb919 in GNUNET_SCHEDULER_run /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:738 #11 0x7ffff70aaedb in GNUNET_PROGRAM_run2 /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/program.c:381 #12 0x7ffff70ac470 in GNUNET_PROGRAM_run /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/program.c:408 #13 0x402bc6 in test_gnunet_chat_message_text_fn ../source/tests/test_gnunet_chat_message.c:136 #14 0x7ffff7e7e11c in tcase_run_tfun_fork /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:497 #15 0x7ffff7e7e11c in srunner_iterate_tcase_tfuns /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:256 #16 0x7ffff7e7e11c in srunner_run_tcase /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:402 #17 0x7ffff7e7e11c in srunner_iterate_suites /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:222 #18 0x7ffff7e7e11c in srunner_run_tagged /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:814 #19 0x4022e3 in main ../source/tests/test_gnunet_chat_message.c:142 #20 0x7ffff622c236 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #21 0x7ffff622c2f1 in __libc_start_main_impl ../csu/libc-start.c:392 #22 0x402350 in _start (/tmp/guix-build-libgnunetchat-0.3.1.drv-0/build/tests/test_gnunet_chat_message.test+0x402350) container_multihashmap.c:268:11: runtime error: load of misaligned address 0x613000000cfb for type 'unsigned int', which requires 4 byte alignment 0x613000000cfb: note: pointer points here 4d 02 2b 7e 33 27 05 14 db 49 b0 05 aa fa 4f 8c 8b 5a a0 5f 2c ca 2d 90 ea 4f c0 f9 15 66 7e 00 ^ #0 0x7ffff6fefc84 in idx_of /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/container_multihashmap.c:268 #1 0x7ffff6fefc84 in GNUNET_CONTAINER_multihashmap_get /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/container_multihashmap.c:287 #2 0x7ffff7f1c9ce in handle_process_records ../source/src/gnunet_chat_handle.c:1005 #3 0x7ffff7f1cf70 in on_monitor_namestore_record ../source/src/gnunet_chat_handle_intern.c:763 #4 0x7ffff6124859 in handle_result /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/service/namestore/namestore_api_monitor.c:245 #5 0x7ffff707f791 in GNUNET_MQ_handle_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mq.c:242 #6 0x7ffff707fe13 in GNUNET_MQ_inject_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mq.c:192 #7 0x7ffff6fc248d in recv_message /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/client.c:347 #8 0x7ffff707bf76 in GNUNET_MST_from_buffer /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/mst.c:222 #9 0x7ffff6fc2c29 in receive_ready /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/client.c:447 #10 0x7ffff70c86a3 in GNUNET_SCHEDULER_do_work /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:2137 #11 0x7ffff70cb919 in select_loop /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:2436 #12 0x7ffff70cb919 in GNUNET_SCHEDULER_run /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/scheduler.c:738 #13 0x7ffff70aaedb in GNUNET_PROGRAM_run2 /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/program.c:381 #14 0x7ffff70ac470 in GNUNET_PROGRAM_run /tmp/guix-build-gnunet-0.21.1.drv-0/gnunet-0.21.1/src/lib/util/program.c:408 #15 0x402bc6 in test_gnunet_chat_message_text_fn ../source/tests/test_gnunet_chat_message.c:136 #16 0x7ffff7e7e11c in tcase_run_tfun_fork /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:497 #17 0x7ffff7e7e11c in srunner_iterate_tcase_tfuns /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:256 #18 0x7ffff7e7e11c in srunner_run_tcase /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:402 #19 0x7ffff7e7e11c in srunner_iterate_suites /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:222 #20 0x7ffff7e7e11c in srunner_run_tagged /tmp/guix-build-check-0.15.2.drv-0/check-0.15.2/src/check_run.c:814 #21 0x4022e3 in main ../source/tests/test_gnunet_chat_message.c:142 #22 0x7ffff622c236 in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58 #23 0x7ffff622c2f1 in __libc_start_main_impl ../csu/libc-start.c:392 #24 0x402350 in _start (/tmp/guix-build-libgnunetchat-0.3.1.drv-0/build/tests/test_gnunet_chat_message.test+0x402350) ============================================================================== Summary of Failures: 1/4 test_gnunet_chat_handle FAIL 4.16s exit status 1 Ok: 3 Expected Fail: 0 Fail: 1 Unexpected Pass: 0 Skipped: 0 Timeout: 0 0001-messenger-make-fields-of-GNUNET_MESSENGER_RoomEntryR.patch (951 bytes)
From f5196b01945501fe1701f728f4b92a742cdff4d7 Mon Sep 17 00:00:00 2001 From: ulfvonbelow <striness@tilde.club> Date: Fri, 3 May 2024 14:12:31 -0500 Subject: [PATCH] messenger: make fields of GNUNET_MESSENGER_RoomEntryRecord packed. --- src/include/gnunet_messenger_service.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/include/gnunet_messenger_service.h b/src/include/gnunet_messenger_service.h index 1bc68b87b..c47a1522f 100644 --- a/src/include/gnunet_messenger_service.h +++ b/src/include/gnunet_messenger_service.h @@ -86,12 +86,12 @@ struct GNUNET_MESSENGER_RoomEntryRecord /** * The peer identity of an open door to a room. */ - struct GNUNET_PeerIdentity door; + struct GNUNET_PeerIdentity door GNUNET_PACKED; /** * The hash identifying the port of the room. */ - struct GNUNET_HashCode key; + struct GNUNET_HashCode key GNUNET_PACKED; }; GNUNET_NETWORK_STRUCT_END -- 2.41.0 0001-Use-aligned-copy-of-room-key-in-handle_process_recor.patch (1,550 bytes)
From 8fabcd2605743ac2b2724a9574fb7ccf752faaaf Mon Sep 17 00:00:00 2001 From: Caleb Ristvedt <reepca@russelstein.xyz> Date: Fri, 3 May 2024 20:25:08 -0500 Subject: [PATCH] Use aligned copy of room key in handle_process_records. --- src/gnunet_chat_handle.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/gnunet_chat_handle.c b/src/gnunet_chat_handle.c index e169a18..947f70e 100644 --- a/src/gnunet_chat_handle.c +++ b/src/gnunet_chat_handle.c @@ -1020,9 +1020,13 @@ handle_process_records (struct GNUNET_CHAT_Handle *handle, if (!record) return NULL; + /* Get a properly-aligned struct to pass to + GNUNET_CONTAINER_multihashmap_get() */ + struct GNUNET_HashCode key; + GNUNET_memcpy (&key, &(record->key), sizeof(key)); struct GNUNET_CHAT_Context *context = GNUNET_CONTAINER_multihashmap_get( handle->contexts, - &(record->key) + &key ); if (context) @@ -1034,7 +1038,7 @@ handle_process_records (struct GNUNET_CHAT_Handle *handle, struct GNUNET_MESSENGER_Room *room = GNUNET_MESSENGER_enter_room( handle->messenger, &(record->door), - &(record->key) + &key ); if (!room) @@ -1046,7 +1050,7 @@ handle_process_records (struct GNUNET_CHAT_Handle *handle, handle_send_room_name(handle, room); if (GNUNET_OK != GNUNET_CONTAINER_multihashmap_put( - handle->contexts, &(record->key), context, + handle->contexts, &key, context, GNUNET_CONTAINER_MULTIHASHMAPOPTION_UNIQUE_FAST)) { context_destroy(context); -- 2.41.0 | ||||
|
I think `struct GNUNET_PeerIdentity` shouldn't have any alignment required since it's storing an array of unsigned char with alignment of 1. So making the key be packed and copying in libgnunetchat sounds reasonable. |
|
sounds good |
|
Resolved upstream in gnunet as well as libgnunetchat. |
|
0.21.2 released |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-05-04 03:29 | ulfvonbelow | New Issue | |
2024-05-04 03:29 | ulfvonbelow | File Added: libgnunetchat-test-log | |
2024-05-04 03:29 | ulfvonbelow | File Added: 0001-messenger-make-fields-of-GNUNET_MESSENGER_RoomEntryR.patch | |
2024-05-04 03:29 | ulfvonbelow | File Added: 0001-Use-aligned-copy-of-room-key-in-handle_process_recor.patch | |
2024-05-05 14:20 | schanzen | Assigned To | => thejackimonster |
2024-05-05 14:20 | schanzen | Status | new => assigned |
2024-05-05 21:42 | thejackimonster | Note Added: 0022353 | |
2024-05-07 07:51 | ulfvonbelow | Note Added: 0022367 | |
2024-05-07 18:54 | thejackimonster | Status | assigned => resolved |
2024-05-07 18:54 | thejackimonster | Resolution | open => fixed |
2024-05-07 18:54 | thejackimonster | Fixed in Version | => 0.21.2 |
2024-05-07 18:54 | thejackimonster | Note Added: 0022369 | |
2024-06-08 12:03 | schanzen | Note Added: 0022547 | |
2024-06-08 12:03 | schanzen | Status | resolved => closed |