Fix reserialize() to properly handle the 'V' and 'K' serialization types
commite2af194cf2523d6a55195e7e38d9bec0e728ef1d
authorDrew Paroski <andrewparoski@fb.com>
Thu, 7 Nov 2013 11:42:59 +0000 (7 03:42 -0800)
committerSara Golemon <sgolemon@fb.com>
Mon, 11 Nov 2013 17:50:21 +0000 (11 09:50 -0800)
treeb53e53d5406f2f6cb14f680932ca85319dee24fc
parent5f2af563e0c678e232225b6997c7137cef331064
Fix reserialize() to properly handle the 'V' and 'K' serialization types

We hit an APC-related bug where reserialize() was being called on a
serialized collection during HHVM startup (when reading APC prime values
from a file), and this caused HHVM to fall over.

This diff fixes reserialize() and adds some test cases and comments.

Reviewed By: @markw65

Differential Revision: D1050281
hphp/runtime/base/type-variant.cpp
hphp/runtime/ext/ext_apc.cpp
hphp/test/ext/test_ext.h
hphp/test/ext/test_ext.inc
hphp/test/ext/test_ext_apc.cpp [copied from hphp/test/ext/test_ext.h with 59% similarity]
hphp/test/ext/test_ext_apc.h [copied from hphp/test/ext/test_ext.h with 69% similarity]