php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #54957 Memleak in alloc_globals_ctor
Submitted: 2011-05-31 01:56 UTC Modified: 2011-05-31 10:27 UTC
From: felipe@php.net Assigned: dmitry (profile)
Status: Closed Package: Scripting Engine problem
PHP Version: 5.4, trunk OS:
Private report: No CVE-ID: None
 [2011-05-31 01:56 UTC] felipe@php.net
Description:
------------
A memory leak happens when using ZTS+USE_ZEND_ALLOC=0 

Test script:
---------------
$ USE_ZEND_ALLOC=0 valgrind --tool=memcheck --leak-check=yes  sapi/cli/php -v
==17712== Memcheck, a memory error detector
==17712== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==17712== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info
==17712== Command: sapi/cli/php -v
==17712== 
PHP 5.5.0-dev (cli) (built: May 30 2011 18:37:59) (DEBUG)
Copyright (c) 1997-2011 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2011 Zend Technologies
==17712== 
==17712== HEAP SUMMARY:
==17712==     in use at exit: 604 bytes in 1 blocks
==17712==   total heap usage: 19,354 allocs, 19,353 frees, 1,466,000 bytes allocated
==17712== 
==17712== 604 bytes in 1 blocks are definitely lost in loss record 1 of 1
==17712==    at 0x4023F50: malloc (vg_replace_malloc.c:236)
==17712==    by 0x8429867: alloc_globals_ctor (zend_alloc.c:2633)
==17712==    by 0x83C103F: ts_allocate_id (TSRM.c:255)
==17712==    by 0x8429917: start_memory_manager (zend_alloc.c:2654)
==17712==    by 0x845D1A4: zend_startup (zend.c:642)
==17712==    by 0x83C893A: php_module_startup (main.c:1901)
==17712==    by 0x85A479B: php_cli_startup (php_cli.c:414)
==17712==    by 0x85A567B: main (php_cli.c:790)
==17712== 
==17712== LEAK SUMMARY:
==17712==    definitely lost: 604 bytes in 1 blocks
==17712==    indirectly lost: 0 bytes in 0 blocks
==17712==      possibly lost: 0 bytes in 0 blocks
==17712==    still reachable: 0 bytes in 0 blocks
==17712==         suppressed: 0 bytes in 0 blocks
==17712== 
==17712== For counts of detected and suppressed errors, rerun with: -v
==17712== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 34 from 9)



Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-05-31 01:56 UTC] felipe@php.net
-Status: Open +Status: Assigned -PHP Version: trunk-SVN-2011-05-30 (SVN) +PHP Version: 5.4, trunk -Assigned To: +Assigned To: dmitry
 [2011-05-31 10:26 UTC] dmitry@php.net
Automatic comment from SVN on behalf of dmitry
Revision: http://svn.php.net/viewvc/?view=revision&revision=311627
Log: Fixed bug #54957 (Memleak in alloc_globals_ctor)
 [2011-05-31 10:27 UTC] dmitry@php.net
-Status: Assigned +Status: Closed
 [2011-05-31 10:27 UTC] dmitry@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 [2011-05-31 13:38 UTC] dmitry@php.net
Automatic comment from SVN on behalf of dmitry
Revision: http://svn.php.net/viewvc/?view=revision&revision=311654
Log: MFH: Fixed bug #54957 (Memleak in alloc_globals_ctor)
 [2012-04-18 09:50 UTC] laruence@php.net
Automatic comment on behalf of dmitry
Revision: http://git.php.net/?p=php-src.git;a=commit;h=d0ba3e188155188944090e0659716f75ab6dda1d
Log: Fixed bug #54957 (Memleak in alloc_globals_ctor)
 [2012-07-24 23:41 UTC] rasmus@php.net
Automatic comment on behalf of dmitry
Revision: http://git.php.net/?p=php-src.git;a=commit;h=d0ba3e188155188944090e0659716f75ab6dda1d
Log: Fixed bug #54957 (Memleak in alloc_globals_ctor)
 [2013-11-17 09:38 UTC] laruence@php.net
Automatic comment on behalf of dmitry
Revision: http://git.php.net/?p=php-src.git;a=commit;h=d0ba3e188155188944090e0659716f75ab6dda1d
Log: Fixed bug #54957 (Memleak in alloc_globals_ctor)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 22:01:28 2024 UTC