Skip to content

Commit 53fa6c5

Browse files
committed
Fix bug #67644 - Memory corruption & crash during ob_start function callback
1 parent 30aceaf commit 53fa6c5

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ PHP NEWS
66
. Fixed bug #47358 (glob returns error, should be empty array()). (Pierre)
77
. Fixed bug #65463 (SIGSEGV during zend_shutdown()). (Keyur Govande)
88
. Fixed bug #66036 (Crash on SIGTERM in apache process). (Keyur Govande)
9+
. Fixed bug #67644 (Memory corruption & crash during ob_start function
10+
callback). (Stas)
911

1012
- OpenSSL:
1113
. Fixed bug #41631 (socket timeouts not honored in blocking SSL reads).

main/main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1767,6 +1767,12 @@ void php_request_shutdown(void *dummy)
17671767
}
17681768
} zend_end_try();
17691769

1770+
/* Output buffer handlers may have created new objects. Mark these objects
1771+
as destructed to avoid calling their dtors too late on shutdown when
1772+
all dtors were supposed to be cleaned
1773+
*/
1774+
zend_objects_store_mark_destructed(&EG(objects_store) TSRMLS_CC);
1775+
17701776
/* 4. Reset max_execution_time (no longer executing php code after response sent) */
17711777
zend_try {
17721778
zend_unset_timeout(TSRMLS_C);

0 commit comments

Comments
 (0)