Bug #64544 [NEW]: Valgrind warnings after using putenv (due to processtitle)

From: Date: Thu, 28 Mar 2013 17:07:41 +0000
Subject: Bug #64544 [NEW]: Valgrind warnings after using putenv (due to processtitle)
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-178171@lists.php.net to get a copy of this message
From:             nikic
Operating system: 
PHP version:      5.5.0beta1
Package:          CGI/CLI related
Bug Type:         Bug
Bug description:Valgrind warnings after using putenv (due to processtitle)

Description:
------------
Due to the changes introduced by https://wiki.php.net/rfc/cli_process_title
running

<?php
putenv("FOO=BAR")

causes the following valgrind warning on shutdown:

==2488== Invalid free() / delete / delete[] / realloc()
==2488==    at 0x402B06C: free (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==2488==    by 0x49B6E03: clearenv (setenv.c:360)
==2488==    by 0x4A3C237: _Exit (_exit.S:30)
==2488==  Address 0x69c6bb0 is 0 bytes inside a block of size 180 free'd
==2488==    at 0x402B06C: free (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==2488==    by 0x8744A6D: cleanup_ps_args (ps_title.c:410)
==2488==    by 0x873A156: main (php_cli.c:1405)



-- 
Edit bug report at https://bugs.php.net/bug.php?id=64544&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=64544&r=trysnapshot54
Try a snapshot (PHP 5.3):   https://bugs.php.net/fix.php?id=64544&r=trysnapshot53
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=64544&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=64544&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=64544&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=64544&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=64544&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=64544&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=64544&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=64544&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=64544&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=64544&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=64544&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=64544&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=64544&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=64544&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=64544&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=64544&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=64544&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=64544&r=mysqlcfg



Thread (4 messages)

« previous php.bugs (#178171) next »