Subject: nbcksum core dumps on amd64
To: None <tech-toolchain@netbsd.org>
From: sgimips NetBSD list <sgimips@mrynet.com>
List: tech-toolchain
Date: 06/15/2004 23:54:09
I've recently started using an amd64 machine as a host for my nightly
release builds for a number of platforms and have discovered that
nbcksum core dumps on the amd64.

I discovered it in the build.sh logs after the world had been built
and the release sets were checksummed.  I investigated further and
found that nbcksum itself simply dumps core, even without any
command-line parameters:

# CKSUM=/tiny/obj/sgimips-main/tooldir.NetBSD-2.0_BETA-x86_64/bin/nbcksum sh /tiny/src/sgimips-main/distrib/sets/makesums -t /tiny/release/sgimips-main/sgimips/binary/sets base.tgz
/tiny/obj/sgimips-main/tooldir.NetBSD-2.0_BETA-x86_64/bin/nbcksum -o1 base.tgz
[1]   Segmentation fault (core dumped) ${CKSUM} -o1 ${l...
[1]   Segmentation fault (core dumped) ${CKSUM} ${lists...
[1]   Segmentation fault (core dumped) ${CKSUM} -m ${li...
[1]   Segmentation fault (core dumped) ${CKSUM} -o2 ${l...
# /tiny/obj/sgimips-main/tooldir.NetBSD-2.0_BETA-x86_64/bin/nbcksum -o1 base.tgz
[1]   Segmentation fault (core dumped) /tiny/obj/sgimips-main/tooldir.NetBSD-2.0_BETA-x86_64/bin/nbcksum -o1 base.tgz
# /tiny/obj/sgimips-main/tooldir.NetBSD-2.0_BETA-x86_64/bin/nbcksum
[1]   Segmentation fault (core dumped) /tiny/obj/sgimips-main/tooldir.NetBSD-2.0_BETA-x86_64/bin/nbcksum

Further tried gdb to see if anything useful was reported, but no such luck:

mod57# gdb /tiny/obj/sgimips-main/tooldir.NetBSD-2.0_BETA-x86_64/bin/nbcksum
GNU gdb 5.3nb1
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64--netbsd"...(no debugging symbols found)...
(gdb) run
Starting program: /tiny/obj/sgimips-main/tooldir.NetBSD-2.0_BETA-x86_64/bin/nbcksum 
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...
Program received signal SIGSEGV, Segmentation fault.
0x0000000040a889f8 in strcmp () from /usr/lib/libc.so.12
(gdb) back
#0  0x0000000040a889f8 in strcmp () from /usr/lib/libc.so.12

The core dumps occur building AT LEAST NetBSD/sgimips, NetBSD/alpha and
NetBSD/sparc64, though I would expect even a native build to fail since
I understand the toolchain nbcksum to be the same for any platform built
on this host.

-scott