]> granicus.if.org Git - php/commit
Revert "Fixed bug #75961 (Strange references behavior)"
authorNikita Popov <nikita.ppv@gmail.com>
Mon, 5 Mar 2018 14:28:58 +0000 (15:28 +0100)
committerNikita Popov <nikita.ppv@gmail.com>
Mon, 5 Mar 2018 14:32:21 +0000 (15:32 +0100)
commitfd5bd37ab129595d51cc05199437c8af3388b3b9
tree0aa6b9a79b0297079ebe4348679d58af6118740a
parent27a603e8116b9efb36f55bb5c9327dc23183ab7c
Revert "Fixed bug #75961 (Strange references behavior)"

This reverts commit 94e9d0a2ae76bad712495d820d3962e401085fef.

This code needs to be mindful about modifications to the array
happening during callback execution. It was written in a way that
only accessed the reference, which is guaranteed not to move. The
changed implementation instead accesses the array slot, leading to
use-after-free.

Run ext/standard/tests/array/bug61967.phpt under valgrind to see
the issue.
ext/standard/array.c
ext/standard/tests/array/bug75961.phpt [deleted file]