initialize values (padding etc) help asan/msan tests
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user