favreau / bullet

Automatically exported from code.google.com/p/bullet
0 stars 0 forks source link

Out of bounds error in ParticlesOCL quick-sort CPU implementation #515

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
File: Demo/ParticlesOpenCL/btParticlesDynamicsWorld.cpp
Function: void btParticlesDynamicsWorld::runSortHashKernel()

Code:
    pHash->quickSort(pHash, 0, m_numParticles );

Description:
 The CPU quicksort implementation is sorting elements from [0 to m_numParticles]. As a result, quicksort accesses elements up to pHash[m_numParticles], which is out of bounds.

Suggested correction: 
   pHash->quickSort(pHash, 0, m_numParticles - 1);

Original issue reported on code.google.com by igelado on 20 May 2011 at 3:56

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r2414.

Original comment by erwin.coumans on 30 Aug 2011 at 4:19

GoogleCodeExporter commented 9 years ago
Fixed in latest trunk:
http://code.google.com/p/bullet/source/detail?r=2414

thanks for the report!

Original comment by erwin.coumans on 30 Aug 2011 at 4:19