Fix cloning of objects with lazy APC properties
commit8c70fede944e3b871460a5f8a3ccbdec0b3a003a
authorRick Lavoie <rlavoie@meta.com>
Sat, 11 Feb 2023 20:58:15 +0000 (11 12:58 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Sat, 11 Feb 2023 20:58:15 +0000 (11 12:58 -0800)
tree77040ec4b9986d106dc660b100a9dd3d8b4f3e2b
parent6b4cb0fb7d4389d284b350f89347da29b2873cc4
Fix cloning of objects with lazy APC properties

Summary:
If a property is lazily decoded from APC, it will have
kInvalidDataType as it's type, which leads to assertions if we call
tvDup on it. Such properties should just use TypedValue's assignment
operator.

Reviewed By: jano, mdko, kavoor

Differential Revision: D43208847

fbshipit-source-id: c8ef602fd9081f9818dfab80fb4e3940c734da41
hphp/runtime/base/object-data.cpp
hphp/test/slow/object/clone-lazy-prop.php [new file with mode: 0644]
hphp/test/slow/object/clone-lazy-prop.php.expect [new file with mode: 0644]