Thank you.
I got a little further this time, but I think the same is true with
dissect_afs(). I'll try to fix it myself also...
Guy Harris wrote:
>
> > Program terminated with signal 10, Bus Error.
>
> ...
>
> > Reading symbols from
> > /usr/platform/SUNW,Ultra-Enterprise/lib/libc_psr.so.1...done.
>
> Oh, big surprise, it's SPARC, not x86....
>
> Methinks that casting "&pd[offset]" to "struct rx_header *" in
> "dissect_rx()" may be ill-advised, given that there's no guarantee that
> "&pd[offset]" is nicely aligned on a 4-byte boundary - in fact, it
> isn't, if the stack trace is to be trusted:
>
> > Reading symbols from /usr/lib/nss_nis.so.1...done.
> > Reading symbols from /usr/lib/nss_files.so.1...done.
> > #0 0x82e60 in dissect_rx (pd=0x1ecab0 "\b", offset=42, fd=0x28ea00,
> > tree=0x0) at packet-rx.c:156
>
> (0x1ecab0 is aligned on a 4-byte boundary, but 42 isn't a multiple of
> 4), and given that many processors (e.g., SPARC processors) don't like
> unaligned references.
>
> > Any help is appreciated.
>
> I've attached a patch. Apply it to "packet-rx.c", and try again.
>
> ------------------------------------------------------------------------
> Name: patch
> patch Type: Plain Text (text/plain)
> Encoding: 7bit
> Description: /tmp/patch
--
Anthony
Script started on Fri Jan 14 12:34:52 2000
patna /ms/user/g/goliaa/ethereal-0.8.1 4$ ^[
patna /ms/user/g/goliaa/ethereal-0.8.1 4$ /gdbgdb ethereal core
GNU gdb 4.17
Copyright 1998 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-sun-solaris2.5.1"...
Core was generated by `./ethereal'.
Program terminated with signal 10, Bus Error.
Reading symbols from /usr/lib/libdl.so.1...done.
Reading symbols from /ms/dist/aurora/lib/libz.so...done.
Reading symbols from /ms/dist/fsf/PROJ/gtk/1.2.0/exec/lib/libgtk-1.2.so.0...done.
Reading symbols from /ms/dist/fsf/PROJ/gtk/1.2.0/exec/lib/libgdk-1.2.so.0...done.
Reading symbols from /ms/dist/fsf/PROJ/glib/1.2.0/exec/lib/libgmodule-1.2.so.0...done.
Reading symbols from /ms/dist/fsf/PROJ/glib/1.2.0/exec/lib/libglib-1.2.so.0...done.
Reading symbols from /usr/lib/libintl.so.1...done.
Reading symbols from /usr/openwin/lib/libXext.so.0...done.
Reading symbols from /usr/openwin/lib/libX11.so.4...done.
Reading symbols from /usr/lib/libsocket.so.1...done.
Reading symbols from /usr/lib/libnsl.so.1...done.
Reading symbols from /usr/lib/libw.so.1...done.
Reading symbols from /usr/lib/libm.so.1...done.
Reading symbols from /usr/lib/libc.so.1...done.
Reading symbols from /usr/lib/libmp.so.1...done.
Reading symbols from /usr/platform/SUNW,Ultra-1/lib/libc_psr.so.1...done.
Reading symbols from /usr/lib/nss_compat.so.1...done.
Reading symbols from /usr/lib/nss_nis.so.1...done.
Reading symbols from /usr/lib/nss_files.so.1...done.
Reading symbols from /usr/lib/nss_dns.so.1...done.
Reading symbols from /usr/lib/libresolv.so.2...done.
#0 dissect_afs (pd=0x1c3578 "", offset=42, fd=0x218e70, tree=0x0) at packet-afs.c:768
768 request_key.callnumber = ntohl(rxh->callNumber);
(gdb) list
763 pi.srcport, pi.destport, NULL);
764 }
765
766 request_key.conversation = conversation->index;
767 request_key.service = ntohs(rxh->serviceId);
768 request_key.callnumber = ntohl(rxh->callNumber);
769
770 request_val = (struct afs_request_val *) g_hash_table_lookup(
771 afs_request_hash, &request_key);
772
(gdb) quiot t
patna /ms/user/g/goliaa/ethereal-0.8.1 5$ exit
script done on Fri Jan 14 12:35:30 2000