Unpoison destination arena when copying mjData.
PiperOrigin-RevId: 658312528 Change-Id: Ie6d3497793ef70b89eaa64dcc7aed4130678f06c
This commit is contained in:
committed by
Copybara-Service
parent
9febd760a1
commit
70a3a541ea
@@ -1272,6 +1272,7 @@ mjData* mj_copyData(mjData* dest, const mjModel* m, const mjData* src) {
|
||||
#define X(type, name, nr, nc) \
|
||||
if (src->name) { \
|
||||
dest->name = (type*)((char*)dest->arena + PTRDIFF(src->name, src->arena)); \
|
||||
ASAN_UNPOISON_MEMORY_REGION(dest->name, sizeof(type)*nr*nc); \
|
||||
memcpy((char*)dest->name, (const char*)src->name, sizeof(type)*nr*nc); \
|
||||
} else { \
|
||||
dest->name = NULL; \
|
||||
|
||||
Reference in New Issue
Block a user