mirror of
https://github.com/corda/corda.git
synced 2025-04-05 10:27:11 +00:00
clear object header flags after copying array in Object.clone()
This commit is contained in:
parent
f1bdc4c745
commit
bd95ccdbd6
@ -108,6 +108,8 @@ Java_java_lang_Object_clone(Thread* t, jclass, jobject o)
|
||||
if (classArrayElementSize(t, class_)) {
|
||||
clone = static_cast<object>(allocate(t, size));
|
||||
memcpy(clone, *o, size);
|
||||
// clear any object header flags:
|
||||
cast<object>(*o, 0) = objectClass(t, *o);
|
||||
} else {
|
||||
clone = make(t, objectClass(t, *o));
|
||||
memcpy(reinterpret_cast<void**>(clone) + 1,
|
||||
|
Loading…
x
Reference in New Issue
Block a user