Bug #67406 [Asn->Csd]: built-in web-server segfaults on startup
| From: | remi@php.net | Date: | Tue, 10 Jun 2014 08:39:24 +0000 |
| Subject: | Bug #67406 [Asn->Csd]: built-in web-server segfaults on startup | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-186127@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=67406&edit=1
ID: 67406
Updated by: remi@php.net
Reported by: remi@php.net
Summary: built-in web-server segfaults on startup
-Status: Assigned
+Status: Closed
Type: Bug
Package: Built-in web server
Operating System: GNU/Linux (aarch64)
PHP Version: 5.4.29
Assigned To: remi
Block user comment: N
Private report: N
New Comment:
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
Previous Comments:
------------------------------------------------------------------------
[2014-06-10 08:15:20] 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
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=67406&edit=1