2.3.2 compiler bug
Alan W
wendt at .cs.colostate.edu
Tue May 21 15:28:11 AEST 1991
System: Xenix 2.3.2 for 286.
Problem: >>= operator rapes stack, dumps core with -M2l.
Reproduce by: compiling the following with -M2l and observing a core dump.
main()
{
static long x;
int i;
for (i = 0; i < 20000; i++)
x >>= 8;
write(1, "done!\n", 6);
}
Fix:
Verify that your compiler exhibits the problem.
Extract the routine __blshr from /lib/Llibc.a.
Use adb -w to change the "reti 6" at its end to a "reti 4".
Verify that you have fixed the problem by recompiling the
test with the .o file on the command line.
Reinstall the .o file into the /lib/Llibc.a archive.
Alan Wendt
More information about the Comp.unix.xenix.sco
mailing list