Bug #72439 [Opn->Csd]: Stream socket with remote address leads to a segmentation fault
| From: | laruence@php.net | Date: | Sun, 19 Jun 2016 04:34:46 +0000 |
| Subject: | Bug #72439 [Opn->Csd]: Stream socket with remote address leads to a segmentation fault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-201727@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=72439&edit=1
ID: 72439
Updated by: laruence@php.net
Reported by: ivan dot enderlin at hoa-project dot net
Summary: Stream socket with remote address leads to a
segmentation fault
-Status: Open
+Status: Closed
Type: Bug
Package: Streams related
PHP Version: 5.6.22
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of laruence@gmail.com
Revision: http://git.php.net/?p=php-src.git;a=commit;h=c4c1993af63fe4c0d19d44ebbd38996471c141af
Log: Fixed bug #72439 (Stream socket with remote address leads to a segmentation fault)
Previous Comments:
------------------------------------------------------------------------
[2016-06-17 12:54:54] ivan dot enderlin at hoa-project dot net
Description:
------------
There is a regression between 5.5 and 5.6. When using
stream_socket_recvfrom or
stream_socket_sendto, we can use the remote address. When we do, a segfault happens.
When we avoid using it, everything is normal.
Test script:
---------------
// server.php
<?php
$server = stream_socket_server('tcp://127.0.0.1:1234');
$client = stream_socket_accept($server);
$message = stream_socket_recvfrom($client, 6, 0, $address);
var_dump($message);
fclose($client);
fclose($server);
// client.php
<?php
$client = stream_socket_client('tcp://127.0.0.1:1234');
stream_socket_sendto($client, 'foobar');
// shell
Run server.php and then client.php side-by-side.
Expected result:
----------------
string(6) "foobar"
Actual result:
--------------
segmentation fault!
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=72439&edit=1