2
+++ b/ext/spl/tests/bug53362.phpt
5
+Bug #53362 (Segmentation fault when extending SplFixedArray)
9
+class obj extends SplFixedArray{
10
+ public function offsetSet($offset, $value) {
26
--- a/ext/spl/spl_fixedarray.c
27
+++ b/ext/spl/spl_fixedarray.c
28
@@ -409,7 +409,11 @@ static void spl_fixedarray_object_write_
29
intern = (spl_fixedarray_object *)zend_object_store_get_object(object TSRMLS_CC);
31
if (intern->fptr_offset_set) {
32
- SEPARATE_ARG_IF_REF(offset);
34
+ ALLOC_INIT_ZVAL(offset);
36
+ SEPARATE_ARG_IF_REF(offset);
38
SEPARATE_ARG_IF_REF(value);
39
zend_call_method_with_2_params(&object, intern->std.ce, &intern->fptr_offset_set, "offsetSet", NULL, offset, value);
40
zval_ptr_dtor(&value);