[ODE] Crash in test_boxstack on Mac OS X

Timothy J. Wood tjw at omnigroup.com
Sat Jul 5 19:22:02 2003


   I just did a clean build of the head of CVS with double-precision and 
debug mode.  I'm using the Dec 2002 Dev Tools package and the latest 
X11 from Apple.

   If I run the box test and hold down 'x' so that a huge number of 
composite objects are created, I get a crash in a couple different 
places.  It seems fairly likely that ODE is blowing the stack with 
alloca usage.  Is this something that is known already?

-tim


1120      dReal *L = (dReal*) ALLOCA (n*nskip*sizeof(dReal));

#0  0x000360b8 in dSolveLCP(int, double*, double*, double*, double*, 
int, double*, double*, int*) (n=228, A=0xbff87f70, x=0xbff86d90, 
b=0xbff874d0, w=0xbff86650, nub=0, lo=0xbfffc730, hi=0xbfffbff0, 
findex=0xbfffbc50) at ode/src/lcp.cpp:1120
#1  0x00021a08 in dInternalStepIsland_x2(dxWorld*, dxBody* const*, int, 
dxJoint* const*, int, double) (world=0x110450, body=0xbffff390, nb=13, 
_joint=0xbffff220, nj=76, stepsize=0.050000000000000003) at 
ode/src/step.cpp:925
#2  0x0002233c in dInternalStepIsland(dxWorld*, dxBody* const*, int, 
dxJoint* const*, int, double) (world=0x110450, body=0xbffff390, nb=13, 
joint=0xbffff220, nj=76, stepsize=0.050000000000000003) at 
ode/src/step.cpp:1064
#3  0x00004364 in processIslands(dxWorld*, double) (world=0x110450, 
stepsize=0.050000000000000003) at ode/src/ode.cpp:173
#4  0x000087bc in dWorldStep (w=0x110450, 
stepsize=0.050000000000000003) at ode/src/ode.cpp:1252
#5  0x00003b20 in simLoop(int) (pause=0) at 
ode/test/test_boxstack.cpp:357
#6  0x0003d35c in dsDrawFrame(int, int, dsFunctions*, int) (width=352, 
height=310, fn=0xbffff730, pause=0) at drawstuff/src/drawstuff.cpp:1068
#7  0x0003fc1c in dsPlatformSimLoop(int, int, dsFunctions*, int) 
(window_width=352, window_height=288, fn=0xbffff730, initial_pause=0) 
at drawstuff/src/x11.cpp:359
#8  0x0003d8cc in dsSimulationLoop (argc=1, argv=0xbffff81c, 
window_width=352, window_height=288, fn=0xbffff730) at 
drawstuff/src/drawstuff.cpp:1180
#9  0x00003dec in main (argc=1, argv=0xbffff81c) at 
ode/test/test_boxstack.cpp:403
#10 0x000022c8 in _start (argc=1, argv=0xbffff81c, envp=0xbffff824) at 
/SourceCache/Csu/Csu-45/crt.c:267
#11 0x00002148 in start ()


1133      int *state = (int*) ALLOCA (n*sizeof(int));
#0  0x00036340 in dSolveLCP(int, double*, double*, double*, double*, 
int, double*, double*, int*) (n=168, A=0xbffbacd0, x=0xbffb9ef0, 
b=0xbffba450, w=0xbffb9990, nub=0, lo=0xbfffcf40, hi=0xbfffc9e0, 
findex=0xbfffc730) at ode/src/lcp.cpp:1133
#1  0x00021a08 in dInternalStepIsland_x2(dxWorld*, dxBody* const*, int, 
dxJoint* const*, int, double) (world=0x110450, body=0xbffff390, nb=12, 
_joint=0xbffff250, nj=56, stepsize=0.050000000000000003) at 
ode/src/step.cpp:925
#2  0x0002233c in dInternalStepIsland(dxWorld*, dxBody* const*, int, 
dxJoint* const*, int, double) (world=0x110450, body=0xbffff390, nb=12, 
joint=0xbffff250, nj=56, stepsize=0.050000000000000003) at 
ode/src/step.cpp:1064
#3  0x00004364 in processIslands(dxWorld*, double) (world=0x110450, 
stepsize=0.050000000000000003) at ode/src/ode.cpp:173
#4  0x000087bc in dWorldStep (w=0x110450, 
stepsize=0.050000000000000003) at ode/src/ode.cpp:1252
#5  0x00003b20 in simLoop(int) (pause=0) at 
ode/test/test_boxstack.cpp:357
#6  0x0003d35c in dsDrawFrame(int, int, dsFunctions*, int) (width=352, 
height=310, fn=0xbffff730, pause=0) at drawstuff/src/drawstuff.cpp:1068
#7  0x0003fc1c in dsPlatformSimLoop(int, int, dsFunctions*, int) 
(window_width=352, window_height=288, fn=0xbffff730, initial_pause=0) 
at drawstuff/src/x11.cpp:359
#8  0x0003d8cc in dsSimulationLoop (argc=1, argv=0xbffff81c, 
window_width=352, window_height=288, fn=0xbffff730) at 
drawstuff/src/drawstuff.cpp:1180
#9  0x00003dec in main (argc=1, argv=0xbffff81c) at 
ode/test/test_boxstack.cpp:403
#10 0x000022c8 in _start (argc=1, argv=0xbffff81c, envp=0xbffff824) at 
/SourceCache/Csu/Csu-45/crt.c:267
#11 0x00002148 in start ()