ld.so dirties user stack

Dan Mick charyb!dan at uunet.uu.net
Wed Feb 14 04:51:16 AEST 1990


In article <4892 at brazos.Rice.edu> gandalf at csli.stanford.edu (Juergen Wagner) writes:
>X-Sun-Spots-Digest: Volume 9, Issue 40, message 1
>
>Hmmm... Don't rely on such things as local variables being
>zero-initialized.  Otherwise, you'll wind up with mysterious errors on
>some machines.

I don't know of *any* machine that assures that local (automatic, stack)
variables are 0!  You may get lucky on VM machines if that's the first
time you've called down that far on the stack, but it's just chance, and
it sure won't be a "benevolent side-effect" on anything like a Sun-4,
which puts most or all of its automatics in registers...

Shudder!  Autos *must* be initialized.  Always.



More information about the Comp.sys.sun mailing list