fix segfault when cloning objects
commit6e1acbc3427ea738e73cd2674bf0b9d6f066a85d
authorDaniel Sloof <goapsychadelic@gmail.com>
Sat, 29 Mar 2014 11:56:16 +0000 (29 12:56 +0100)
committerSara Golemon <sgolemon@fb.com>
Tue, 1 Apr 2014 00:58:59 +0000 (31 17:58 -0700)
treef4d9a9bba436e4268af0af560717b7e450532958
parent6698889d549e83f5e30cc53040061cd63277e398
fix segfault when cloning objects

ObjectData::cloneSet makes the false assertion that an objects dynamic
properties can only have string-based keys.

When casting an array with numeric keys to an object and then cloning
this object will cause HHVM to segfault due to lack of KindOfInt64
support.

Closes #2200.

Reviewed By: @edwinsmith

Differential Revision: D1248203
hphp/runtime/base/object-data.cpp
hphp/test/slow/clone/numeric-dynprops.php [new file with mode: 0644]
hphp/test/slow/clone/numeric-dynprops.php.expectf [new file with mode: 0644]