Bug #54957 [NEW]: Memleak in alloc_globals_ctor
From: felipe
Operating system:
PHP version: trunk-SVN-2011-05-30 (SVN)
Package: Scripting Engine problem
Bug Type: Bug
Bug description:Memleak in alloc_globals_ctor
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 bug report at http://bugs.php.net/bug.php?id=54957&edit=1
--
Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=54957&r=trysnapshot52
Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=54957&r=trysnapshot53
Try a snapshot (trunk): http://bugs.php.net/fix.php?id=54957&r=trysnapshottrunk
Fixed in SVN: http://bugs.php.net/fix.php?id=54957&r=fixed
Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=54957&r=needdocs
Fixed in release: http://bugs.php.net/fix.php?id=54957&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=54957&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=54957&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=54957&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=54957&r=support
Expected behavior: http://bugs.php.net/fix.php?id=54957&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=54957&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=54957&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=54957&r=globals
PHP 4 support discontinued: http://bugs.php.net/fix.php?id=54957&r=php4
Daylight Savings: http://bugs.php.net/fix.php?id=54957&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=54957&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=54957&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=54957&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=54957&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=54957&r=mysqlcfg
Thread (3 messages)
- felipe@php.net