On Mon, 2002-12-16 at 17:09, Cliff Woolley wrote:
> I assume it's a valid assumption among this group that everybody knows
> that SIGBUS on a Sparc usually means an unaligned access was attempted,
> right?
As Cliff pointed out, it is probably an unaligned access error. Here is
the culprit line after the preprocessor has had its way:
A = (ntohl(*(bpf_u_int32 *)&p[k]));
(gdb) disassemble ntohl
Dump of assembler code for function ntohl:
0x702ce540 <ntohl>: nop
0x702ce544 <ntohl+4>: retl
0x702ce548 <ntohl+8>: nop
ntohl is a noop because we are on a big endian architecture.
(gdb) print k
$15 = 30
(gdb) print &p[k]
$16 = (u_char *) 0x7267be "\n\aĆ\034\b"
Can we just make a char* an int* and dereference it? Only if it is 4
byte aligned.
-tduffy
--
YOO-ESS-AYE! YOO-ESS-AYE!
---------------------------------------------------------------------
For help using this (nmap-dev) mailing list, send a blank email to
nmap-dev-help_at_insecure.org . List run by ezmlm-idx (www.ezmlm.org).
Received on Dec 17 2002