Subject: Re: xsrc/15357: stack trashing bug crashing the sparc Xservers
To: NetBSD Bugs and PR posting List <netbsd-bugs@netbsd.org>
From: Greg A. Woods <woods@weird.com>
List: netbsd-bugs
Date: 03/18/2002 18:53:01
[ On Monday, March 18, 2002 at 17:06:30 (-0600), Peter Seebach wrote: ]
> Subject: Re: xsrc/15357: stack trashing bug crashing the sparc Xservers 
>
> In message <20020318225526.BB4768D@proven.weird.com>, Greg A. Woods writes:
> > True enough, though I based my claim on the assumption that tempGrab, an
> > automatic structure variable, would have had all its fields initialised
> > to zero,
> 
> Why should an automatic structure have its fields initialized at all?
> Automatic variables are not default-initialized in standard C.

I dunno -- you tell me!  ;-)

Note we're not talking about "standard C" here, but rather about
GCC-2.95.3 specifically, and with the Stack Smashing Protector patch
applied (though I don't think the SSP patch changes initialisers -- just
ordering of automatics on the stack).

I haven't tried to go back up a frame and try to walk through the 'grab'
list to see if it still hangs together well enough to find out if the
value in tempGrab.modifierDevice is possibly from one such node.

However if you look at what is now in tempGrab (as I posted previously
in the PR) you'll see only zeros and what appear to be valid values.
The pointer assigned to tempGrab.modifierDevice also appears to be valid
(well at least it points to storage that contains what appear to be
reasonable values for all its respecitive fields).

Maybe all that's just a result of another successfull call to the
function just previously....

-- 
								Greg A. Woods

+1 416 218-0098;  <gwoods@acm.org>;  <g.a.woods@ieee.org>;  <woods@robohack.ca>
Planix, Inc. <woods@planix.com>; VE3TCP; Secrets of the Weird <woods@weird.com>