Compatibility problem?

Timothy E. Onders onders at taac.ipl.rpi.edu
Tue Aug 7 05:31:43 AEST 1990


I've got a mysterious problem.  I've taken the following program:

main()
{
	int r, c;
	int testm[1024][1024];

	r = 0;
	c = 0;
	for (r = 0 ; r < 1024 ; r++)
	{
		for (c = 0 ; c < 1024 ; c++)
		{
			testm[c][r] = c * 10000 + r;
		}
	}
}

It compiles on both a Sun 3, and a Sun 4.  When run on a Sun 4, it does
fine.  When run on the Sun 3, attempting to write to the array gives a
SEGV.  Attempting to read the array from dbx gives a "bad address" error.
by examining the addresses of the three variables, there seems to be
enough space for everything allocated. There is 4 megs of space between
the array starting address, and the address of r.  Any ideas what might be
causing this problem, and how I can get around it?

					-Tim Onders
					onders at ipl.rpi.edu




More information about the Comp.sys.sun mailing list