php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #62742 Memory leak in php -s while build with --enable-zend-multibyte
Submitted: 2012-08-03 17:18 UTC Modified: 2020-11-22 04:22 UTC
From: laruence@php.net Assigned: cmb (profile)
Status: No Feedback Package: Scripting Engine problem
PHP Version: 5.3.15 OS:
Private report: No CVE-ID: None
 [2012-08-03 17:18 UTC] laruence@php.net
Description:
------------
<code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br />$a&nbsp;</span><span style="color: 
#007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">SplFileInfo</span>
<span style="color: #007700">(</span><span style="color: 
#0000BB">__FILE__</span><span style="color: #007700">);<br /></span><span 
style="color: #0000BB">$b&nbsp;</span><span style="color: #007700">=&nbsp;
</span><span style="color: #0000BB">$a</span><span style="color: #007700">-&gt;
</span><span style="color: #0000BB">openFile</span><span style="color: #007700">
(</span><span style="color: #DD0000">'r'</span><span style="color: #007700">);
<br /></span><span style="color: #0000BB">print_r</span><span style="color: 
#007700">(</span><span style="color: #0000BB">$b</span><span style="color: 
#007700">);<br /></span><span style="color: #0000BB">print_r</span><span 
style="color: #007700">(</span><span style="color: 
#0000BB">get_class_methods</span><span style="color: #007700">(</span><span 
style="color: #DD0000">"SplFileObject"</span><span style="color: #007700">));<br 
/></span><span style="color: #0000BB">$file&nbsp;</span><span style="color: 
#007700">=&nbsp;new&nbsp;</span><span style="color: 
#0000BB">SplFileObject</span><span style="color: #007700">(</span><span 
style="color: #0000BB">__FILE__</span><span style="color: #007700">);<br />
</span><span style="color: #0000BB">var_dump</span><span style="color: #007700">
(</span><span style="color: #0000BB">get_class_vars</span><span style="color: 
#007700">(</span><span style="color: #DD0000">"SplFileObject"</span><span 
style="color: #007700">));<br /></span>
</span>
</code>[Sat Aug  4 01:12:37 2012]  Script:  '/tmp/1.php'
Zend/zend_language_scanner.l(714) :  Freeing 0x091F3600 (201 bytes), 
script=/tmp/1.php
[Sat Aug  4 01:12:37 2012]  Script:  '/tmp/1.php'
Zend/zend_language_scanner.l(288) :  Freeing 0x091F3720 (202 bytes), 
script=/tmp/1.php
=== Total 2 memory leaks detected ===

Test script:
---------------
a php script, whatever it is

Expected result:
----------------
no leak

Actual result:
--------------
mem leak

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2012-08-03 17:19 UTC] laruence@php.net
I have got a fix, will commit after I tested tomorrow :)
 [2012-08-03 17:19 UTC] laruence@php.net
-Assigned To: +Assigned To: laruence
 [2017-10-24 08:00 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: laruence +Assigned To:
 [2018-09-12 23:37 UTC] nikic@php.net
@laruence: Is this report still relevant?
 [2020-11-09 17:32 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2020-11-09 17:32 UTC] cmb@php.net
Is this still an issue with any of the actively supported PHP
versions[1]?

[1] <https://www.php.net/supported-versions.php>
 [2020-11-22 04:22 UTC] php-bugs at lists dot php dot net
No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 16:01:28 2024 UTC