[comp.sys.sgi] Bug Report

jgrosh@BRL.MIL (John Grosh, IBD) (09/25/90)

We have detected a bug in IRIX 3.3.1 on the Personal Iris 4D/25G.  
When the following program is compiled, the user no longer has
control of mouse events, and other graphics programs (e.g.
gr_osview) get almost no runtime.  When compiled with the -DFIX
option, the O/S runs normally.  Note that the POWER Series
machines do not appear to be affected by this problem. 


---------------- bug.c ----------------

/* 
	Compiling broken version: 
		cc -o bug bug.c -lgl_s 
		cc -o bug bug.c -lgl 

	Compiling working version: 
		cc -DFIX -o bug bug.c -lgl_s for working version 
*/


#include <gl/gl.h>
#include <sys/types.h>
#include <sys/time.h>

main()
{
	short buf[512*512];

	foreground(); 
	prefposition(100,611,100,611);
	winopen("Broken");

	while(1) {
		rectwrite(0,0,511,511, buf);
#ifdef FIX
		delay(0.0001);
#endif
	}
}

delay(time)
double time;
{
	struct timeval tv;

	tv.tv_sec  = time;
	tv.tv_usec = (time - tv.tv_sec) * (1E6);

	select(0,0L,0L,0L,&tv);
}