Bug #72439 [NEW]: Stream socket with remote address leads to a segmentation fault

From: Date: Fri, 17 Jun 2016 12:54:58 +0000
Subject: Bug #72439 [NEW]: Stream socket with remote address leads to a segmentation fault
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-201692@lists.php.net to get a copy of this message
From: ivan dot enderlin at hoa-project dot net Operating system: PHP version: 5.6.22 Package: Streams related Bug Type: Bug Bug description:Stream socket with remote address leads to a segmentation fault 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 bug report at https://bugs.php.net/bug.php?id=72439&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=72439&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=72439&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=72439&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=72439&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=72439&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=72439&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=72439&r=needscript Try newer version: https://bugs.php.net/fix.php?id=72439&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=72439&r=support Expected behavior: https://bugs.php.net/fix.php?id=72439&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=72439&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=72439&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=72439&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=72439&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=72439&r=dst IIS Stability: https://bugs.php.net/fix.php?id=72439&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=72439&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=72439&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=72439&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=72439&r=mysqlcfg

« previous php.bugs (#201692) next »