Double free issue on PosixThreadSupport.cpp

ymhsieh
Posts: 4
Joined: Thu Nov 15, 2012 12:39 pm

Double free issue on PosixThreadSupport.cpp

Post by ymhsieh »

Hello,

I believe there is an issue in BulletMultiThreaded/PosixThreadSupport.cpp.

After tracing the code, I concluded that
1. the PosixThreadSupport::stopSPU() is called by the SpuCollisionTaskProcess::~SpuCollisionTaskProcess()
2. the PosixThreadSupport::stopSPU() is also called by PosixThreadSupport::~PosixThreadSupport()

As a result, the PosixThreadSupport::mainSemaphore got destroyed twice. And it causes some memory block to be freed twice.
ymhsieh
Posts: 4
Joined: Thu Nov 15, 2012 12:39 pm

Re: Double free issue on PosixThreadSupport.cpp

Post by ymhsieh »

I have got it fixed. Can I submit a patch to bullet SVN?