php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #64544 Valgrind warnings after using putenv (due to processtitle)
Submitted: 2013-03-28 17:07 UTC Modified: 2013-03-29 14:54 UTC
From: nikic@php.net Assigned: keyur (profile)
Status: Closed Package: CGI/CLI related
PHP Version: 5.5.0beta1 OS:
Private report: No CVE-ID: None
 [2013-03-28 17:07 UTC] nikic@php.net
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)



Patches

bug64544.patch (last revision 2013-03-29 03:52 UTC by laruence@php.net)

Pull Requests

Pull requests:

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2013-03-29 03:11 UTC] laruence@php.net
The following patch has been added/updated:

Patch Name: bug64544.patch
Revision:   1364526708
URL:        https://bugs.php.net/patch-display.php?bug=64544&patch=bug64544.patch&revision=1364526708
 [2013-03-29 03:52 UTC] laruence@php.net
The following patch has been added/updated:

Patch Name: bug64544.patch
Revision:   1364529144
URL:        https://bugs.php.net/patch-display.php?bug=64544&patch=bug64544.patch&revision=1364529144
 [2013-03-29 14:54 UTC] keyur@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: keyur
 [2013-03-29 14:54 UTC] keyur@php.net
The fix for this bug has been committed.

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/.

 For Windows:

http://windows.php.net/snapshots/
 
Thank you for the report, and for helping us make PHP better.

Fix committed to git: https://github.com/php/php-
src/commit/5bf6323e5114646357197a343d202c0f1b8450a1

Thanks for finding this!
 [2013-03-29 15:43 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=953f07503aa695009aab729370e458dc26784a8b
Log: Fixed bug #64544 (Valgrind warnings after using putenv)
 [2013-03-29 15:46 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=953f07503aa695009aab729370e458dc26784a8b
Log: Fixed bug #64544 (Valgrind warnings after using putenv)
 [2013-11-17 09:31 UTC] laruence@php.net
Automatic comment on behalf of laruence
Revision: http://git.php.net/?p=php-src.git;a=commit;h=953f07503aa695009aab729370e458dc26784a8b
Log: Fixed bug #64544 (Valgrind warnings after using putenv)
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Dec 30 14:01:28 2024 UTC