[ODE] Patch fo use of uninitialised value of size 8 in checkMass(dMass*)

Martin C. Martin martin at metahuman.org
Tue Jun 10 14:41:01 2003


Hi,

I've applied this patch (actually, I did it slightly differently) and
updated CVS.  I've also change text_boxstack and text_collision to work
with MSVC's quaint for-scoping rules.  Olivier, could you check the
current CVS version and see if it's valgrind clean?

Thanks,
Martin

Olivier Michel wrote:
> 
> The patch is the following: replace line 62 of mass.cpp:
> 
>   for (int i=0; i<12; i++) I2[i] = m->I[i] + m->mass*I2[i];
> 
> by the following:
> 
>   for (int i=0; i<12; i++) if (i%4!=3) I2[i] = m->I[i] + m->mass*I2[i];
> 
> That fixes the problem. Can anyone commit this patch ? Thanks.
> Otherwise ODE seems to be pretty valgrind clean (this patch apparently
> also fixes the other problem I mentionned).
> 
> -Olivier
> 
> Olivier Michel wrote:
> 
> > After recompiling ODE in debug mode, valgrind told me the error is in
> > line 62 of file mass.cpp./
> > /I understood the problem and I will submit a patch soon. It is
> > related with matrix computation and should not cause any bugs, but it
> > is not very clean (does useless extra computation and polute
> > valgrind), hence I'd prefer to see it fixed. I also found another
> > similar problem in another source file of ODE. I will also try to fix it.
> >
> > -Olivier
> >
> > Martin C. Martin wrote:
> >
> >> Can you provide any more details, such as a line number or a stack
> >> trace?
> >>
> >> - Martin
> >>
> >> Olivier Michel wrote:
> >>
> >>
> >>> Hello,
> >>>
> >>> I tryed valgind (a memory leak debugger) on ODE and it found some
> >>> possible problem in ODE:
> >>>
> >>> "use of uninitialised value of size 8 in checkMass(dMass *)"
> >>>
> >>> You can reproduce this problem by installing valgrind and running it on
> >>> test_boxstack:
> >>>
> >>> # valgrind ./test_boxstack.exe
> >>>
> >>> -Olivier
> >>>
> >>
> >
> > _______________________________________________
> > ODE mailing list
> > ODE@q12.org
> > http://q12.org/mailman/listinfo/ode
> >
> 
> --
> -Olivier Michel
> http://www.cyberbotics.com
> Phone/Fax: +41 21 693 8624
> 
> _______________________________________________
> ODE mailing list
> ODE@q12.org
> http://q12.org/mailman/listinfo/ode