lkml.org 
[lkml]   [2000]   [Jan]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectCompiler bug? [was: Re: My bug !]
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();
\
 
 \ /
  Last update: 2005-03-22 13:56    [W:0.036 / U:0.076 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site