Compiler bug? [was: Re: My bug !]
Manfred Spraul
manfreds en colorfullife.com
Dom Ene 30 16:34:34 CST 2000
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
------------ próxima parte ------------
--- 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();
Más información sobre la lista de distribución Ayuda