Edit report at https://bugs.php.net/bug.php?id=62839&edit=1

 ID:                 62839
 Updated by:         fel...@php.net
 Reported by:        martin at mixotv dot com
 Summary:            curl_copy_handle segfault with CURLOPT_FILE
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            cURL related
 Operating System:   Linux 3.4.8-1
 PHP Version:        5.4.5
 Block user comment: N
 Private report:     N

 New Comment:

Try disabling xdebug.


Previous Comments:
------------------------------------------------------------------------
[2012-08-16 13:58:36] martin at mixotv dot com

Description:
------------
When using cURL with the option CURLOPT_FILE (write the result of the curl 
request in a file), curl_copy_handle() causes a SEGFAULT.

I use the packages from Archlinux repository (php, libcurl 7.27.0 x86_64).

I get the same results with a current ubuntu distribution.

Test script:
---------------
<?php

$curl = curl_init();

$fd = fopen('/tmp/test', 'wb');
curl_setopt($curl, CURLOPT_FILE, $fd);

$copy = curl_copy_handle($curl);

var_dump($copy);

curl_close($copy);
curl_close($curl);
fclose($fd);

Expected result:
----------------
no segfault

Actual result:
--------------
segfault:

#0  0x00007ffff5ca6f46 in ?? () from /usr/lib/php/modules/curl.so
#1  0x00007ffff5ec0f0d in xdebug_execute_internal () from 
/usr/lib/php/modules/xdebug.so
#2  0x00000000006dac6d in ?? ()
#3  0x00000000006946ff in execute ()
#4  0x00007ffff5ec1392 in xdebug_execute () from /usr/lib/php/modules/xdebug.so
#5  0x00000000006355d9 in zend_execute_scripts ()
#6  0x00000000005d5393 in php_execute_script ()
#7  0x00000000006dd433 in ?? ()
#8  0x000000000042601a in ?? ()
#9  0x00007ffff692d725 in __libc_start_main () from /lib/libc.so.6
#10 0x00000000004260ad in _start ()


------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=62839&edit=1

Reply via email to