Fix bug in setting up lval args
Summary:
Our code for setting up arguments to native calls doesn't handle constant lval args correctly: it uses the constant value for both the type and value pointers.
The most common constant lvals are the immutable uninit and null TypedValues, which we use for member ops that are guaranteed to have no effect. The broken code above accidentally worked, because interpreting (int64_t)0 as a DataType happens to yield KindOfUninit, and uninit and null are similar enough that the behavior works out.
This coincidental situation broke in my next diff, where I have a different DataType encoding. However, we can trigger the breakage by simply using "more interesting" values for these two sentinel TypedValues, which causes quick/unset_badbase.php and quick/vec/member-ops.php to core. Do so, and fix the revealed issue.
Reviewed By: ricklavoie
Differential Revision:
D26142971
fbshipit-source-id:
4e76849a7eda774c866204e6deb8436c66e8442f