Ethereal-dev: Re: [ethereal-dev] Re: core dumps on bus error on Solaris 8

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Guy Harris <guy@xxxxxxxxxx>
Date: Fri, 23 Jun 2000 10:36:41 -0700 (PDT)
> On Fri, Jun 23, 2000 at 10:50:23AM -0500, Christine Tran wrote:
> I'm not familiar enough with the sparc architecture to know hy
> the debugger lists 6 arguments to each dissect*() call instead of either
> 3 or 4.

Given that the args are being dumped as hex numbers, the Ethereal binary
probably doesn't have a debugger symbol table.  (Was it compiled with
Sun C rather than GCC?  GCC supports "-g" and "-O2" being used together,
and, at least on both Solaris and FreeBSD, the configure script arranges
that they both be used together.  Perhaps it doesn't do so for Sun C.)

This means that the debugger has no idea how many arguments the function
actually takes, so it dumps the first 6 "in" registers (or maybe the
first 6 "out" registers in the topmost stack frame if the function in
question is a leaf routine) in which arguments are passed.

> What's interesting is the first argument to each dissect*()
> call. The pointer to the data buffer (const u_char *pd) is 0x1f56c8
> in the first 3 dissections (_packet, _eth, and _llc). Well, that's if
> I'm converting this 6-arg list to a 3 or 4 arg list correctly in my head.
> But then it changes in the call to dissect_bpdu to 0x15.

Is "pd" a dead variable by that point in the code?  If so, the register
in which it was passed may have been recycled for use by something else?