initialize values (padding etc) help asan/msan tests

This commit is contained in:
Erwin Coumans
2017-05-09 18:00:28 -07:00
parent 7da4a362e1
commit fc6fb7b14c
19 changed files with 109 additions and 14 deletions

View File

@@ -199,11 +199,17 @@ SIMD_FORCE_INLINE int btCylinderShape::calculateSerializeBufferSize() const
SIMD_FORCE_INLINE const char* btCylinderShape::serialize(void* dataBuffer, btSerializer* serializer) const
{
btCylinderShapeData* shapeData = (btCylinderShapeData*) dataBuffer;
btConvexInternalShape::serialize(&shapeData->m_convexInternalShapeData,serializer);
shapeData->m_upAxis = m_upAxis;
// Fill padding with zeros to appease msan.
shapeData->m_padding[0] = 0;
shapeData->m_padding[1] = 0;
shapeData->m_padding[2] = 0;
shapeData->m_padding[3] = 0;
return "btCylinderShapeData";
}