From: zedorg at gmail dot com Operating system: Any PHP version: 5.3.0 PHP Bug Type: SOAP related Bug description: soap call Segmentation fault on a redirected url
Description: ------------ Making a soap call to an url which redirects, cause segfault in php. Can reproduce in the following systems and versions: php 5.3(win32bit), php 5.2.9(linux, debian 64bit), php 5.2.6(win32bit), Reproduce code: --------------- $s=new SoapClient('valid.wsdl',array('location'=>'http://www.horacero.com.mx','classmap'=>array('doAny'=>'DoAny'))); // passes $s->doAny(null) // segfault here Expected result: ---------------- throwing a SoapFault exception Actual result: -------------- php Segmentation fault Here is the last lines from strace output: ... socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("216.52.254.1")}, 28) = 0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR) fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 poll([{fd=3, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1 sendto(3, "\333\355\1\0\0\1\0\0\0\0\0\0\3www\10horacero\3com\2mx"..., 37, 0, NULL, 0) = 37 poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, 5000) = 1 ioctl(3, FIONREAD, [136]) = 0 recvfrom(3, "\333\355\201\200\0\1\0\0\0\1\0\0\3www\10horacero\3com\2"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("216.52.254.1")}, [16]) = 136 close(3) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("216.52.254.1")}, 28) = 0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR) fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 poll([{fd=3, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1 sendto(3, "\271\315\1\0\0\1\0\0\0\0\0\0\3www\10horacero\3com\2mx"..., 48, 0, NULL, 0) = 48 poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, 5000) = 1 ioctl(3, FIONREAD, [107]) = 0 recvfrom(3, "\271\315\201\200\0\1\0\0\0\1\0\0\3www\10horacero\3com\2"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("216.52.254.1")}, [16]) = 107 close(3) = 0 socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 connect(3, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("216.52.254.1")}, 28) = 0 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR) fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 poll([{fd=3, events=POLLOUT, revents=POLLOUT}], 1, 0) = 1 sendto(3, "\303a\1\0\0\1\0\0\0\0\0\0\3www\10horacero\3com\2mx"..., 37, 0, NULL, 0) = 37 poll([{fd=3, events=POLLIN, revents=POLLIN}], 1, 5000) = 1 ioctl(3, FIONREAD, [186]) = 0 recvfrom(3, "\303a\201\200\0\1\0\1\0\3\0\2\3www\10horacero\3com\2mx"..., 1024, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("216.52.254.1")}, [16]) = 186 close(3) = 0 socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 3 fcntl(3, F_GETFL) = 0x2 (flags O_RDWR) fcntl(3, F_SETFL, O_RDWR|O_NONBLOCK) = 0 connect(3, {sa_family=AF_INET, sin_port=htons(80), sin_addr=inet_addr("208.94.113.194")}, 16) = -1 EINPROGRESS (Operation now in progress) poll([{fd=3, events=POLLIN|POLLOUT|POLLERR|POLLHUP, revents=POLLOUT}], 1, 60000) = 1 getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0 fcntl(3, F_SETFL, O_RDWR) = 0 sendto(3, "POST / HTTP/1.1\r\nHost: www.horac"..., 504, MSG_DONTWAIT, NULL, 0) = 504 poll([{fd=3, events=POLLIN|POLLERR|POLLHUP, revents=POLLIN}], 1, 60000) = 1 recvfrom(3, "HTTP/1.1 302 Object moved\r\nDate:"..., 8192, MSG_DONTWAIT, NULL, NULL) = 402 close(3) = 0 --- SIGSEGV (Segmentation fault) @ 0 (0) --- The url: www dot horacero dot com dot mx gives the following headers: HTTP/1.x 302 Object moved Date: Wed, 18 Nov 2009 14:36:10 GMT Location: portada/ Content-Length: 129 Content-Type: text/html Cache-Control: private -- Edit bug report at http://bugs.php.net/?id=50219&edit=1 -- Try a snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=50219&r=trysnapshot52 Try a snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=50219&r=trysnapshot53 Try a snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=50219&r=trysnapshot60 Fixed in SVN: http://bugs.php.net/fix.php?id=50219&r=fixed Fixed in SVN and need be documented: http://bugs.php.net/fix.php?id=50219&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=50219&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=50219&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=50219&r=needscript Try newer version: http://bugs.php.net/fix.php?id=50219&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=50219&r=support Expected behavior: http://bugs.php.net/fix.php?id=50219&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=50219&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=50219&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=50219&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=50219&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=50219&r=dst IIS Stability: http://bugs.php.net/fix.php?id=50219&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=50219&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=50219&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=50219&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=50219&r=mysqlcfg