summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2014-08-30 18:32:12 -0700
committerStanislav Malyshev <stas@php.net>2014-09-02 12:31:03 -0700
commit53fa6c5b6b5b09059ba54c8912d0c0aef57aa4ff (patch)
tree75f760285a6cd432a00eb9063581550649439265 /main
parent30aceaf1a7cf9ef6f32806463212323c6ab89f09 (diff)
downloadphp-git-53fa6c5b6b5b09059ba54c8912d0c0aef57aa4ff.tar.gz
Fix bug #67644 - Memory corruption & crash during ob_start function callback
Diffstat (limited to 'main')
-rw-r--r--main/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/main/main.c b/main/main.c
index 8546500f32..e0b0916185 100644
--- a/main/main.c
+++ b/main/main.c
@@ -1767,6 +1767,12 @@ void php_request_shutdown(void *dummy)
}
} zend_end_try();
+ /* Output buffer handlers may have created new objects. Mark these objects
+ as destructed to avoid calling their dtors too late on shutdown when
+ all dtors were supposed to be cleaned
+ */
+ zend_objects_store_mark_destructed(&EG(objects_store) TSRMLS_CC);
+
/* 4. Reset max_execution_time (no longer executing php code after response sent) */
zend_try {
zend_unset_timeout(TSRMLS_C);