Nmap Development mailing list archives

nmap on sparc/linux


From: Tom Duffy <tduffy () sun com>
Date: Thu, 05 Dec 2002 11:50:35 -0800

I tried to run nmap on a gentoo sparc64/linux box (blade 2000 with 2
Cheetah+ procs) and got a bus error.  I am trying to debug what
happened, but am hitting a brick wall. I can only think the EXTRACT_LONG
macro is b0rken (compiler bug? -- using gcc 3.2.1) on sparc/linux.

Here is the error I am getting:

blade2000-1 tmp # uname -a
Linux blade2000-1 2.4.20 #3 SMP Tue Dec 3 18:17:33 PST 2002 sparc64
sun4u TI UltraSparc III+ (Cheetah+) GNU/Linux

blade2000-1 nmap-3.10ALPHA4 # file nmap
nmap: ELF 32-bit MSB executable, SPARC, version 1 (SYSV), for GNU/Linux
2.4.0, dynamically linked (uses shared libs), not stripped

blade2000-1 nmap-3.10ALPHA4 # gcc -v 
Reading specs from /usr/lib/gcc-lib/sparc-unknown-linux-gnu/3.2.1/specs
Configured with: /var/tmp/portage/gcc-3.2.1/work/gcc-3.2.1/configure
--prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info
--enable-shared --host=sparc-unknown-linux-gnu
--build=sparc-unknown-linux-gnu --target=sparc-unknown-linux-gnu
--with-system-zlib --enable-languages=c,c++,ada,f77,objc,java
--enable-threads=posix --enable-long-long --disable-checking
--enable-cstdio=stdio --enable-clocale=generic --enable-__cxa_atexit
--enable-version-specific-runtime-libs
--with-gxx-include-dir=/usr/include/g++-v32
--with-local-prefix=/usr/local --enable-shared --enable-nls
--without-included-gettext
Thread model: posix
gcc version 3.2.1

blade2000-1 nmap-3.10ALPHA4 # gdb ./nmap
GNU gdb 5.2.1
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 "sparc-unknown-linux-gnu"...
(gdb) set args -O deedeed
(gdb) run
Starting program: /root/nmap-3.10ALPHA4/nmap -O deedeed

Starting nmap V. 3.10ALPHA4 ( www.insecure.org/nmap/ )

Program received signal SIGBUS, Bus error.
0x0003b5e0 in bpf_filter (pc=0x704d68, p=0x704658 "", wirelen=42, buflen=42)
    at bpf_filter.c:300
300                             continue;
Current language:  auto; currently c
(gdb) bt
#0  0x0003b5e0 in bpf_filter (pc=0x704d68, p=0x704658 "", wirelen=42, 
    buflen=42) at bpf_filter.c:300
#1  0x00032c28 in pcap_read_packet (handle=0x7044c8, 
    callback=0x33b4c <pcap_oneshot>, userdata=0xefff6b98 "ïÿl\030")
    at pcap-linux.c:451
#2  0x00033b98 in pcap_next (p=0x7044c8, h=0xefff6c18) at pcap.c:112
#3  0x0001d2f4 in readip_pcap(pcap*, unsigned*, long) (pd=0x7044c8, 
    len=0xefff6cd8, to_usec=6000000) at tcpip.cc:1385
#4  0x00019d20 in get_ping_results(int, pcap*, Target**, int, timeval*, pingtune*, timeout_info*, int, pingtech*, 
scan_lists*) (sd=-1, pd=0x7044c8, 
    hostbatch=0x6cfdf8, pingtype=50, time=0x6cf150, pt=0xefffb350, to=0x609ec, 
    id=56575, ptech=0xefffaf44, ports=0x6c7304) at targets.cc:889
#5  0x00018a78 in massping(Target**, int, scan_lists*, int) (
    hostbatch=0x6cfdf8, num_hosts=1, ports=0x6c7304, pingtype=50)
    at targets.cc:471
#6  0x00018000 in nexthost(HostGroupState*, scan_lists*, int*) (hs=0x6cf998, 
    ports=0x6c7304, pingtype=0x6e3b8) at targets.cc:271
#7  0x000146d0 in nmap_main(int, char**) (argc=3, argv=0xeffffcc4)
    at nmap.cc:774
#8  0x00012674 in main (argc=3, argv=0xeffffcc4, envp=0xeffffcd4)
    at main.cc:169
(gdb) print pc
$1 = (struct bpf_insn *) 0x704d68
(gdb) print *pc
$2 = {code = 32, jt = 0 '\0', jf = 0 '\0', k = 30}
(gdb) print A
$3 = 2048

Any thoughts?  Would any other debugging info help fix this problem?

Thanks,

-tduffy

-- 
YOO-ESS-AYE! YOO-ESS-AYE!


---------------------------------------------------------------------
For help using this (nmap-dev) mailing list, send a blank email to 
nmap-dev-help () insecure org . List run by ezmlm-idx (www.ezmlm.org).



Current thread: