#29431 [Fbk->Csd]: segfault using stream_* with UDP

From: Date: Wed, 28 Jul 2004 23:31:33 +0000
Subject: #29431 [Fbk->Csd]: segfault using stream_* with UDP
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-63715@lists.php.net to get a copy of this message
ID: 29431 Updated by: wez@php.net Reported By: nlopess@php.net -Status: Feedback +Status: Closed Bug Type: Network related Operating System: Linux 2.4 PHP Version: 4.3.7 New Comment: Fixed in HEAD. Previous Comments: ------------------------------------------------------------------------ [2004-07-29 01:00:25] wez@php.net Does it segfault if you disable the sockets extension? (Looking into your script now, but the valgrind output indicates that ext/sockets is still a bad choice) ------------------------------------------------------------------------ [2004-07-28 17:31:09] nlopess@php.net Description: ------------ PHP 5 HEAD segfaults with the given code. Below are URLs with valgrind/gdb output. Reproduce code: --------------- <? $socket = stream_socket_server("udp://127.0.0.1:13", $errno, $errstr, STREAM_SERVER_BIND); if (!$socket) die("$errstr ($errno)"); do { $pkt = stream_socket_recvfrom($socket, 1, 0, $peer); stream_socket_sendto($socket, date("D M j H:i:s Y\r\n"), 0, $peer); } while ($pkt !== false); ?> Actual result: -------------- http://testes.aborla.net/gdb.txt http://testes.aborla.net/out.pid7736 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=29431&edit=1

« previous php.bugs (#63715) next »