https://bugzilla.wikimedia.org/show_bug.cgi?id=66943

--- Comment #1 from Tim Starling <[email protected]> ---
This is a result of the Make/Copy work that I did in proxy-array.cpp in
<https://github.com/facebook/hhvm/commit/342b1193a6a15e32bd0e8bf1fad3678ae4e7ba17>
. Make() gives a reference count of 1, but Copy() gives a reference count of
zero, so if you want to use Copy() in the same place as Make() then you have to
incref the result. ProxyArray::Copy() in particular has the diff:

 ProxyArray::Copy(const ArrayData* ad) {
-  return innerArr(ad)->copy();
+  return Make(innerArr(ad)->copy());
 }

This is doubly wrong, since ProxyArray::Copy() should return an array with a
refcount of zero, which Make() doesn't do, and also Make() expects an argument
with a refcount of 1, which innerArr(ad)->copy() doesn't give. The result is
that arrays returned from EZC will cause a crash when you use them in certain
ways, such as sorting them.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to