Obscure SunOS bug

Aaron Sloman aarons%cogs.sussex.ac.uk at nsfnet-relay.ac.uk
Sat May 6 09:24:29 AEST 1989


Some of us were finding that in certain circumstances running our Poplog
system on a Sun4 with SunOS4.0 produced "illegal instruction", and that
this could be cured either by defining an extra environment variable or by
using unsetenv to remove one. We thought it was a Poplog bug, till our
chief programmer, John Gibson, showed that the symptom could be produced
in C.

Here is his analysis:

The Poplog bug that Aaron was getting on csunb (illegal instruction) turns
out to be a OS bug on the Sun-4 (something to do with paging on the
stack).

The following little C program exhibits the bug, but to do so it must be
run from csh without ANY environment variables defined (i.e. login without
a .login and then "unsetenv" on all the standard ones so that "printenv"
prints nothing).

f7() { ; }
f6() { f7();}
f5() { f6();}
f4() { f5();}
f3() { f4();}
f2() { f3();}
f1() { f2();}

main() { char a[12112]; f1(); }

Aaron Sloman,
School of Cognitive and Computing Sciences,
Univ of Sussex, Brighton, BN1 9QN, England
    ARPANET : aarons%uk.ac.sussex.cogs at nsfnet-relay.ac.uk
    JANET     aarons at cogs.sussex.ac.uk
    BITNET:   aarons%uk.ac.sussex.cogs at uk.ac
        or    aarons%uk.ac.sussex.cogs%ukacrl.bitnet at cunyvm.cuny.edu
    UUCP:     ...mcvax!ukc!cogs!aarons



More information about the Comp.sys.sun mailing list