diff --git a/ext/standard/tests/serialize/bug69139.phpt b/ext/standard/tests/serialize/bug69139.phpt new file mode 100644 index 00000000000..48127a2461c --- /dev/null +++ b/ext/standard/tests/serialize/bug69139.phpt @@ -0,0 +1,10 @@ +--TEST-- +Bug #69139 (Crash in gc_zval_possible_root on unserialize) +--FILE-- + +--EXPECT-- +Alive diff --git a/ext/standard/var.c b/ext/standard/var.c index 5e986d451d3..1c5a000c250 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -1036,7 +1036,7 @@ PHP_FUNCTION(unserialize) zend_hash_destroy(class_hash); FREE_HASHTABLE(class_hash); } - zval_dtor(return_value); + zval_ptr_dtor(return_value); if (!EG(exception)) { php_error_docref(NULL, E_NOTICE, "Error at offset " ZEND_LONG_FMT " of %d bytes", (zend_long)((char*)p - buf), buf_len); }