php.net |  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: tony2001@php.net Assigned: cmb (profile)
Status: Wont fix Package: APC (PECL)
PHP Version: 5_3.1RC2 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: tony2001@php.net
New email:
PHP Version: OS:

 

 [2009-10-27 08:28 UTC] tony2001@php.net
Description:
------------
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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

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] cmb@php.net
-Status: Open +Status: Wont fix -Assigned To: +Assigned To: cmb
 [2016-08-31 15:20 UTC] cmb@php.net
According to <https://bugs.php.net/69618>, 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: Thu Apr 18 00:01:28 2024 UTC