Fix refcounting crashing in dict
commitf9e3022b3010cce483f8e783db95e0da18327014
authorPaul Bissonnette <paulbiss@fb.com>
Wed, 25 May 2016 22:13:40 +0000 (25 15:13 -0700)
committerHhvm Bot <hhvm-bot-bot@fb.com>
Wed, 25 May 2016 22:15:00 +0000 (25 15:15 -0700)
tree08ce341d913339e291ecff6e9037e000446aae63
parent7ad3e6f4d9c9acbaedafced41919fdd039c8bdf1
Fix refcounting crashing in dict

Summary:
A refcounting bug was causing a use-after-free. Introduce a move and non-move
version of ConvertToDict for type safety.

Reviewed By: swtaarrs

Differential Revision: D3292162

fbshipit-source-id: b92a0d5427faee9ce185e180d49a549769b20ce1
hphp/compiler/expression/unary_op_expression.cpp
hphp/runtime/base/array-data.cpp
hphp/runtime/base/array-data.h
hphp/runtime/base/mixed-array.cpp
hphp/runtime/base/type-array.cpp
hphp/runtime/base/type-array.h
hphp/runtime/ext/array/ext_array.cpp
hphp/test/slow/dict/dict-crash.php [new file with mode: 0644]
hphp/test/slow/dict/dict-crash.php.expect [new file with mode: 0644]