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

@@ -1511,6 +1511,9 @@ void btDiscreteDynamicsWorld::serializeDynamicsWorldInfo(btSerializer* serialize
worldInfo->m_solverInfo.m_splitImpulse = getSolverInfo().m_splitImpulse;
// Fill padding with zeros to appease msan.
memset(worldInfo->m_solverInfo.m_padding, 0, sizeof(worldInfo->m_solverInfo.m_padding));
#ifdef BT_USE_DOUBLE_PRECISION
const char* structType = "btDynamicsWorldDoubleData";
#else//BT_USE_DOUBLE_PRECISION

View File

@@ -507,6 +507,11 @@ const char* btRigidBody::serialize(void* dataBuffer, class btSerializer* seriali
rbd->m_linearSleepingThreshold=m_linearSleepingThreshold;
rbd->m_angularSleepingThreshold = m_angularSleepingThreshold;
// Fill padding with zeros to appease msan.
#ifdef BT_USE_DOUBLE_PRECISION
memset(rbd->m_padding, 0, sizeof(rbd->m_padding));
#endif
return btRigidBodyDataName;
}