php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67406 built-in web-server segfaults on startup
Submitted: 2014-06-10 08:15 UTC Modified: 2014-06-10 08:15 UTC
From: remi@php.net Assigned: remi (profile)
Status: Closed Package: Built-in web server
PHP Version: 5.4.29 OS: GNU/Linux (aarch64)
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: remi@php.net
New email:
PHP Version: OS:

 

 [2014-06-10 08:15 UTC] remi@php.net
Description:
------------
In php_cli_server, we use a static const struct timeval

According to select man page :
   "(ii)   select() may update the timeout argument to indicate how much time was left."

Removing the "static const" solves this issue.

Test script:
---------------
$ gdb sapi/cli/php
(gdb)  run -S 127.0.0.1:8000


Expected result:
----------------
PHP 5.5.13 Development Server started at Tue Jun 10 03:08:42 2014
Listening on http://127.0.0.1:8000
Document root is /discer.farm/home/remote/rcollet/rpmbuild/BUILD/php-5.5.13
Press Ctrl-C to quit.



Actual result:
--------------
Program received signal SIGSEGV, Segmentation fault.
(gdb) bt
#0  0x000003ffb7cf23d4 in select () from /lib64/libc.so.6
#1  0x00000000006e96d4 in php_cli_server_poller_poll (poller=0x879668 <server+8>, tv=0x80c1a8 <tv.15150>) at /home/remote/rcollet/rpmbuild/BUILD/php-5.5.13/sapi/cli/php_cli_server.c:901
#2  0x00000000006edfa0 in php_cli_server_do_event_loop (server=0x879660 <server>) at /home/remote/rcollet/rpmbuild/BUILD/php-5.5.13/sapi/cli/php_cli_server.c:2480
#3  0x00000000006ee31c in do_cli_server (argc=3, argv=0x880f10) at /home/remote/rcollet/rpmbuild/BUILD/php-5.5.13/sapi/cli/php_cli_server.c:2583
#4  0x00000000006e2dd0 in main (argc=3, argv=0x880f10) at /home/remote/rcollet/rpmbuild/BUILD/php-5.5.13/sapi/cli/php_cli.c:1381


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-06-10 08:15 UTC] remi@php.net
-Assigned To: +Assigned To: remi
 [2014-06-10 08:39 UTC] remi@php.net
Automatic comment on behalf of remi
Revision: http://git.php.net/?p=php-src.git;a=commit;h=58c6a08e00d4a8c99123cfb36f3a399a9b352d24
Log: Fixed bug #67406 built-in web-server segfaults on startup
 [2014-06-10 08:39 UTC] remi@php.net
-Status: Assigned +Status: Closed
 [2014-06-12 01:08 UTC] dmitry@php.net
Automatic comment on behalf of remi
Revision: http://git.php.net/?p=php-src.git;a=commit;h=58c6a08e00d4a8c99123cfb36f3a399a9b352d24
Log: Fixed bug #67406 built-in web-server segfaults on startup
 [2014-06-19 00:53 UTC] tyrael@php.net
Automatic comment on behalf of remi
Revision: http://git.php.net/?p=php-src.git;a=commit;h=58c6a08e00d4a8c99123cfb36f3a399a9b352d24
Log: Fixed bug #67406 built-in web-server segfaults on startup
 [2014-07-02 08:26 UTC] ab@php.net
Automatic comment on behalf of remi
Revision: http://git.php.net/?p=php-src.git;a=commit;h=58c6a08e00d4a8c99123cfb36f3a399a9b352d24
Log: Fixed bug #67406 built-in web-server segfaults on startup
 [2014-07-02 08:34 UTC] ab@php.net
Automatic comment on behalf of remi
Revision: http://git.php.net/?p=php-src.git;a=commit;h=58c6a08e00d4a8c99123cfb36f3a399a9b352d24
Log: Fixed bug #67406 built-in web-server segfaults on startup
 [2014-10-07 23:14 UTC] stas@php.net
Automatic comment on behalf of remi
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=58c6a08e00d4a8c99123cfb36f3a399a9b352d24
Log: Fixed bug #67406 built-in web-server segfaults on startup
 [2014-10-07 23:26 UTC] stas@php.net
Automatic comment on behalf of remi
Revision: http://git.php.net/?p=php-src-security.git;a=commit;h=58c6a08e00d4a8c99123cfb36f3a399a9b352d24
Log: Fixed bug #67406 built-in web-server segfaults on startup
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Oct 14 11:01:27 2024 UTC