[ODE] [PATCH] ODE compilation and OPCODE segfault on AMD64

Tanguy Fautre tanguy.fautre at spaceapplications.com
Tue Mar 15 11:54:56 MST 2005


Hello,

well, since Russ Smith created the UNSTABLE CVS branch, I feel like 
reposting proper CVS patches that have already been posted in the 
previous months.
Now if a nice developer wants to check them in. ;-)

The first patch addresses the compilation issue with ODE on AMD64, where 
timer.cpp contains incorrect inline assembly for x86-64 systems. (this 
patch was posted previously by Frederic Marmond)

The second patch fixes the pointer to integer conversion in OPCODE, 
which leads to a nice segfault as soon as one tries to use Trimesh 
collision in ODE.
The patch simply uses 64 bits integer to keep the pointer values on 64 
bits systems. This is not the most optimized solution, as the author as 
already pointed out (the best would be to use a 64 bits base pointer and 
keep 32 bits integers for the offset). But This patch addresses the most 
important issue: OPCODE being useless on 64 bits systems.

If someone wants to optimize the second patch the way the author 
suggests, be my guest.

Note: these patch were not tested back on a "regular" 32 bits system, 
however they should work correctly in theory, and they should not change 
the current behavior of ODE on such systems. (to be tested of course)

PS: These patches were done against the main trunk of the CVS. I'm a bit 
unfamiliar with CVS, and I could not get to checkout the UNSTABLE 
branch. Any hints?


Regards,

Tanguy



More information about the ODE mailing list