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

Olivier Michel Olivier.Michel at cyberbotics.com
Thu Jun 12 02:21:01 2003


Hello,

It seems that valgrind is happy with your version of the patch too. Now 
ODE seems to be valgrind clean (at least, what my app uses in ODE is 
valgrind clean). I will let you know if ever valgrind finds problems in ODE.

-Olivier

Martin C. Martin wrote:

>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
>>>>>
>>>>>          
>>>>>