aarons%cogs.sussex.ac.uk@nsfnet-relay.ac.uk (Aaron Sloman) (05/06/89)
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@nsfnet-relay.ac.uk JANET aarons@cogs.sussex.ac.uk BITNET: aarons%uk.ac.sussex.cogs@uk.ac or aarons%uk.ac.sussex.cogs%ukacrl.bitnet@cunyvm.cuny.edu UUCP: ...mcvax!ukc!cogs!aarons