Bug #67644 [Asn->Csd]: Memory corruption & crash during ob_start function callback
| From: | stas@php.net | Date: | Tue, 02 Sep 2014 19:33:26 +0000 |
| Subject: | Bug #67644 [Asn->Csd]: Memory corruption & crash during ob_start function callback | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-187391@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67644&edit=1
ID: 67644
Updated by: stas@php.net
Reported by: jocelyn dot fournier at gmail dot com
Summary: Memory corruption & crash during ob_start function
callback
-Status: Assigned
+Status: Closed
Type: Bug
Package: Reproducible crash
Operating System: Mac OS X
PHP Version: 5.4.30
Assigned To: mike
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of stas
Revision: http://git.php.net/?p=php-src.git;a=commit;h=53fa6c5b6b5b09059ba54c8912d0c0aef57aa4ff
Log: Fix bug #67644 - Memory corruption & crash during ob_start function callback
Previous Comments:
------------------------------------------------------------------------
[2014-08-31 12:00:34] jocelyn dot fournier at gmail dot com
Ok, so the register_shutdown + ob_start approach is the best way to do this, as long as we are sure
register_shutdown is called before ob_start (which should always be the case).
I cannot use ob_flush() because my lib is loaded on auto_prepend_file.
------------------------------------------------------------------------
[2014-08-31 01:35:00] stas@php.net
BTW, if you add a flush at the end of the script, this also fixes the issue.
------------------------------------------------------------------------
[2014-08-31 00:45:04] stas@php.net
Looking at the library, I see that it runs a lot of code from __destruct function which is called on
shutdown. This is usually not the best idea as the services the object needs to run his code may be
already partially shut down. I'll still see if it can be handled better, but I'm not sure
if this code will actually work properly in this way.
------------------------------------------------------------------------
[2014-08-29 14:42:59] jocelyn dot fournier at gmail dot com
I've just modified the code on https://github.com/jocel1/php5.4-crash to not
require a working AMQP server.
------------------------------------------------------------------------
[2014-08-29 07:50:12] stas@php.net
It would help a lot if there was a reproducing case that does not require running rabbitmq server.
You say you have different cases reproducing it, can any of them be cut down so that actual amqp
server is not needed to reproduce?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=67644
--
Edit this bug report at https://bugs.php.net/bug.php?id=67644&edit=1