[ODE] SIGSEGV in dSolveLCP() at ode/src/lcp.cpp:1137
Olivier Michel
Olivier.Michel at cyberbotics.com
Thu Feb 19 17:56:32 MST 2004
Hi,
Here is a first version of the ALLOCA replacement by dynamic memory
allocation (currently malloc/free):
http://cyberboticspc1.epfl.ch/ftp/ode.tar.bz2
I just added a compiler switch in the user-settings.example (disabled by
default) which allow to replace the ALLOCA by malloc/free calls in the
patched lcp.cpp file only (this is actually the most critical source of
stack overflow).
The ode.tar.bz2 archive only contains new versions for:
config/user-settings.example
Makefile
ode/src/lcp.cpp
This contribution is just a first version and could be improved with the
following:
(1) use faster functions to replace the vanilla malloc() / free()
functions.
(2) generalize the replacement of ALLOCA in other files (like step.cpp,
stepfast.cpp, etc.). The current version only replace the ALLOCA in
lcp.cpp and this appears as a nice trade-off between efficiency and
stability (not SIGSEGV any more with my pretty complex simulation and a
very little performance drop). So, be cautious if you want to extend the
use of malloc/free to other files as this may yield to serious
performance drops...
This contribution is very simple and early. However, I hope it could be
introduced in the ODE CVS right now since it doesn't change anything if
the switch is not set (default) and it will save a lot of time to
developers facing the SIGSEGV crash caused by stack overflow...
Thanks.
-Olivier
More information about the ODE
mailing list