Bug 292032 - armv7 on aarch64 (tested chroot, lib32) gets SIGSEGV for the likes of: gpart show [native armv7 kernel use contexts do not get any SIGSEGV's]

Mark Millard <[email protected]>
Newsgroups gmane.os.freebsd.current,gmane.os.freebsd.devel.arm
Message-ID <[email protected]>
The context here is official pkgbase distribution installation usage,
not personal builds. /usr/src/ is from the pkgbase installation, not
git use.

A backtrace from chroot use on aarch64 looks like:

Core was generated by `gpart show'.
Program terminated with signal SIGSEGV, Segmentation fault.
Address not mapped to object.
#0 0x200c5ef0 in delete_config (gp=0x2053c1dc) at /usr/src/lib/libgeom/geom_xml2tree.c:502

warning: Source file is more recent than executable.
502 LIST_REMOVE(cf, lg_config);
(gdb) bt
#0 0x200c5ef0 in delete_config (gp=0x2053c1dc) at /usr/src/lib/libgeom/geom_xml2tree.c:502
#1 geom_deletetree (gmp=gmp@entry=0xffffcb30) at /usr/src/lib/libgeom/geom_xml2tree.c:524
#2 0x204d2064 in gpart_show (req=<optimized out>, fl=<optimized out>) at /home/pkgbuild/worktrees/main/lib/geom/part/geom_part.c:808
#3 0x000230dc in run_command (argc=0, argv=<optimized out>) at /usr/src/sbin/geom/core/geom.c:497
#4 0x00022308 in main (argc=1, argv=0xffffdc5c) at /usr/src/sbin/geom/core/geom.c:861

Operation of the same armv7 world files in a booted armv7 kernel context
does not get any SIGSEGV's. This is true even using the files from the
same media moved from native use to a chroot usage context on aarch64.
On aarch64, the likes of:

# env GEOM_LIBRARY_PATH=/usr/lib32:/usr/lib32/geom /mnt/sbin/gpart show

also gets a SIGSEGV.

NOTE:
Be warned that inappropriate %ld formatting use was recently fixed and
caused some problems earlier in the execution, including SIGSEGV
behavior. Test with/after 2025-Dec-29's:

    • git: faff7013187b - main - geom_part: Fix format string issues Dag-Erling Smørgrav 

See:

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=292032

===
Mark Millard
marklmi at yahoo.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.