|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #58922 memleaks in APC on empty script
Submitted: 2009-10-27 08:28 UTC Modified: 2016-08-31 15:20 UTC
From: Assigned: cmb (profile)
Status: Wont fix Package: APC (PECL)
PHP Version: 5_3.1RC2 OS: Linux
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2009-10-27 08:28 UTC]
Running an empty script with CGI + APC produces the following memleak:

# ./sapi/cgi/php-cgi -T2 /path/to/empty.php

[Tue Oct 27 16:15:43 2009]  Script:  'ZZZZZZZZZZj�����&_''
/local/app/APC-3.1.3p1/apc_zend.c(38) :  Freeing 0x00AE19F0 (4 bytes), script=ZZZZZZZZZZj�����&_'
=== Total 1 memory leaks detected ===
X-Powered-By: PHP/5.3.2-dev
Content-type: text/html

Reproduce code:
<?php ?>

Actual result:
X-Powered-By: PHP/5.3.2-dev
Content-type: text/html

X-Powered-By: PHP/5.3.2-dev
Content-type: text/html

[Tue Oct 27 16:27:57 2009]  Script:  'ZZZZZZZZZZ3Hmtmtb&#65533;A'
/local/app/APC-3.1.3p1/apc_zend.c(38) :  Freeing 0x00AE19F0 (4 bytes), script=ZZZZZZZZZZ3Hmtmtb&#65533;A
=== Total 1 memory leaks detected ===

Elapsed time: 0.003568 sec


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2009-10-28 10:16 UTC] gopalv82 at yahoo dot com
Has to do with the ->refcount of every op_array.

It can't be free'd because free'ing it too early broke references in php user space. So it has to be done after every RSHUTDOWN is done and there is no hook for that.
 [2016-08-31 15:20 UTC]
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2016-08-31 15:20 UTC]
According to <>, APC support has been
discontinued in favor of OPcache, APCu, the session upload
progress API and WinCache. Therefore this issue won't get fixed.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Feb 24 14:01:29 2024 UTC