Bug #54957 [Opn->Asn]: Memleak in alloc_globals_ctor
Edit report at http://bugs.php.net/bug.php?id=54957&edit=1
ID: 54957
Updated by: felipe@php.net
Reported by: felipe@php.net
Summary: Memleak in alloc_globals_ctor
-Status: Open
+Status: Assigned
Type: Bug
Package: Scripting Engine problem
-PHP Version: trunk-SVN-2011-05-30 (SVN)
+PHP Version: 5.4, trunk
-Assigned To:
+Assigned To: dmitry
Block user comment: N
Private report: N
Previous Comments:
------------------------------------------------------------------------
[2011-05-31 01:56:03] 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)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54957&edit=1
Thread (3 messages)