|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #60115 memory definitely lost in cli server
Submitted: 2011-10-23 03:01 UTC Modified: 2011-10-23 03:02 UTC
From: Assigned: laruence
Status: Closed Package: Built-in web server
PHP Version: 5.4.0beta2 OS:
Private report: No CVE-ID:
 [2011-10-23 03:01 UTC]
run built-in server with valgrind:
USE_ZEND_ALLOC=0 C=0 valgrind --leak-check=full  php -S db-sf- 

then request a 404 page

Test script:

Expected result:
no memory lost 

Actual result:
==9611== 26 bytes in 1 blocks are definitely lost in loss record 7 of 72
==9611==    at 0x490514E: malloc (vg_replace_malloc.c:195)
==9611==    by 0x302AF6FC91: strdup (in /lib64/tls/
==9611==    by 0x9C27E1: get_last_error (php_cli_server.c:285)
==9611==    by 0x9C7EE7: php_cli_server_send_error_page (php_cli_server.c:1702)
==9611==    by 0x9C8CFE: php_cli_server_begin_send_static 
==9611==    by 0x9C9C22: php_cli_server_dispatch (php_cli_server.c:1978)
==9611==    by 0x9CA1C2: php_cli_server_recv_event_read_request 
==9611==    by 0x9CA504: php_cli_server_do_event_for_each_fd_callback 
==9611==    by 0x9C5BCE: php_cli_server_poller_iter_on_active 
==9611==    by 0x9CA571: php_cli_server_do_event_for_each_fd 
==9611==    by 0x9CA5C5: php_cli_server_do_event_loop (php_cli_server.c:2264)
==9611==    by 0x9CA8A7: do_cli_server (php_cli_server.c:2365)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2011-10-23 03:02 UTC]
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

 For Windows:
Thank you for the report, and for helping us make PHP better.

 [2011-10-23 03:02 UTC]
-Status: Open +Status: Closed -Assigned To: +Assigned To: laruence
PHP Copyright © 2001-2015 The PHP Group
All rights reserved.
Last updated: Mon Nov 30 09:02:05 2015 UTC