aarch64/armv7 via lib32 and via chroot: db_test:btree_byteswap_unaligned_access_skbd gets bus error

From: Mark Millard <marklmi_at_yahoo.com>
Date: Tue, 01 Aug 2023 17:12:12 UTC
I do not know if the unaligned access activity in the likes of:

db_test:btree_byteswap_unaligned_access_skbd

is some form of FreeBSD requirement or not. But, for armv7
activity, it results in a bus error (and kyua test failure).
Probaly also true native armv7 operation.

===> lib/libc/db/db_test:btree_byteswap_unaligned_access_skbd
Result:     failed: atf-check failed; see the output of the test for details
Start time: 2023-08-01T09:07:38.975390Z
End time:   2023-08-01T09:07:39.006220Z
Duration:   0.031s

Metadata:
    allowed_architectures is empty
    allowed_platforms is empty
    description = btree: small key, big data, byteswap unaligned access
    has_cleanup = false
    is_exclusive = false
    required_configs is empty
    required_disk_space = 0
    required_files is empty
    required_memory = 0
    required_programs is empty
    required_user is empty
    timeout = 300

Standard output:
Executing command [ /usr/obj/DESTDIRs/main-CA7-chroot/usr/tests/lib/libc/db/h_db -o out -i psize=512,lorder=1234 btree in ]
Executing command [ /usr/obj/DESTDIRs/main-CA7-chroot/usr/tests/lib/libc/db/h_db -o out -i psize=512,lorder=4321 btree in ]

Standard error:
Fail: program did not exit cleanly
stdout:

stderr:

Files left in work directory after failure: h_db.core, in, out


For reference:

Reading symbols from /usr/obj/DESTDIRs/main-CA7-chroot/usr/tests/lib/libc/db/h_db...
(No debugging symbols found in /usr/obj/DESTDIRs/main-CA7-chroot/usr/tests/lib/libc/db/h_db)
[New LWP 102818]
Core was generated by `/usr/obj/DESTDIRs/main-CA7-chroot/usr/tests/lib/libc/db/h_db -o out -i psize=512'.
Program terminated with signal SIGBUS, Bus error.
Invalid address alignment.
#0  __bt_pgout (t=<optimized out>, pg=<optimized out>, pp=0x4060651c) at /usr/main-src/lib/libc/db/btree/bt_conv.c:174
174 P_32_SWAP(p);
(gdb) bt
#0  __bt_pgout (t=<optimized out>, pg=<optimized out>, pp=0x4060651c) at /usr/main-src/lib/libc/db/btree/bt_conv.c:174
#1  0x401468ac in mpool_write (mp=0x40610000, bp=0x40606500) at /usr/main-src/lib/libc/db/mpool/mpool.c:406
#2  mpool_sync (mp=0x40610000) at /usr/main-src/lib/libc/db/mpool/mpool.c:329
#3  0x4013d548 in __bt_sync (dbp=<optimized out>, dbp@entry=0x4060b000, flags=<optimized out>) at /usr/main-src/lib/libc/db/btree/bt_close.c:146
#4  0x4013d35c in __bt_close (dbp=0x4060b000) at /usr/main-src/lib/libc/db/btree/bt_close.c:80
#5  0x000221b4 in main ()


===
Mark Millard
marklmi at yahoo.com