Compiler bug? [was: Re: My bug !]

From: Manfred Spraul (manfreds@colorfullife.com)
Date: Sun Jan 30 2000 - 17:23:58 EST


joy-creative crashed during module initialization, you do not need a
real joystick to test that:

insmod joystick
insmod joy-creative

* with egcs-1.12, it crashes
* the problem is the first loop in js_cr_read_packet(): it overwrites
the return address.
* the code uses __u64, i.e. "unsigned long long"
* with the attached patch, it seems to work.

Could someone test joy-creative with the other relevant compilers?
(egcs-2.95, gcc-2.7.2.3)

--
	Manfred

--- 2.3/drivers/char/joystick/joy-creative.c Tue Dec 14 18:20:00 1999 +++ build-2.3/drivers/char/joystick/joy-creative.c Sun Jan 30 23:17:04 2000 @@ -67,10 +67,11 @@ int i, j, ret; for (i = 0; i < 2; i++); { - r[i] = buf[i] = 0; + r[i] = 0; p[i] = t[i] = JS_CR_MAX_STROBE; p[i] += JS_CR_MAX_STROBE; } + buf[0]=buf[1]=0; __save_flags(flags); __cli();

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jan 31 2000 - 21:00:26 EST