[PHP-BUG] Bug #62839 [NEW]: curl_copy_handle segfault with CURLOPT_FILE

2012-08-16 Thread martin at mixotv dot com
From: martin at mixotv dot com
Operating system: Linux 3.4.8-1
PHP version:  5.4.5
Package:  cURL related
Bug Type: Bug
Bug description:curl_copy_handle segfault with CURLOPT_FILE

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:
---
https://bugs.php.net/bug.php?id=62839&edit=1
-- 
Try a snapshot (PHP 5.4):
https://bugs.php.net/fix.php?id=62839&r=trysnapshot54
Try a snapshot (PHP 5.3):
https://bugs.php.net/fix.php?id=62839&r=trysnapshot53
Try a snapshot (trunk):  
https://bugs.php.net/fix.php?id=62839&r=trysnapshottrunk
Fixed in SVN:
https://bugs.php.net/fix.php?id=62839&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=62839&r=needdocs
Fixed in release:
https://bugs.php.net/fix.php?id=62839&r=alreadyfixed
Need backtrace:  
https://bugs.php.net/fix.php?id=62839&r=needtrace
Need Reproduce Script:   
https://bugs.php.net/fix.php?id=62839&r=needscript
Try newer version:   
https://bugs.php.net/fix.php?id=62839&r=oldversion
Not developer issue: 
https://bugs.php.net/fix.php?id=62839&r=support
Expected behavior:   
https://bugs.php.net/fix.php?id=62839&r=notwrong
Not enough info: 
https://bugs.php.net/fix.php?id=62839&r=notenoughinfo
Submitted twice: 
https://bugs.php.net/fix.php?id=62839&r=submittedtwice
register_globals:
https://bugs.php.net/fix.php?id=62839&r=globals
PHP 4 support discontinued:  
https://bugs.php.net/fix.php?id=62839&r=php4
Daylight Savings:https://bugs.php.net/fix.php?id=62839&r=dst
IIS Stability:   
https://bugs.php.net/fix.php?id=62839&r=isapi
Install GNU Sed: 
https://bugs.php.net/fix.php?id=62839&r=gnused
Floating point limitations:  
https://bugs.php.net/fix.php?id=62839&r=float
No Zend Extensions:  
https://bugs.php.net/fix.php?id=62839&r=nozend
MySQL Configuration Error:   
https://bugs.php.net/fix.php?id=62839&r=mysqlcfg



Bug #62839 [Fbk->Opn]: curl_copy_handle segfault with CURLOPT_FILE

2012-08-16 Thread martin at mixotv dot com
Edit report at https://bugs.php.net/bug.php?id=62839&edit=1

 ID: 62839
 User updated by:martin at mixotv dot com
 Reported by:martin at mixotv dot com
 Summary:curl_copy_handle segfault with CURLOPT_FILE
-Status: Feedback
+Status: Open
 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:

Hi Felipe,

Here is the backtrace without Xdebug:

Program received signal SIGSEGV, Segmentation fault.
#0  0x75ed9f46 in ?? () from /usr/lib/php/modules/curl.so
#1  0x006dae02 in ?? ()
#2  0x006946ff in execute ()
#3  0x006355d9 in zend_execute_scripts ()
#4  0x005d5393 in php_execute_script ()
#5  0x006dd433 in ?? ()
#6  0x0042601a in ?? ()
#7  0x7692d725 in __libc_start_main () from /lib/libc.so.6
#8  0x004260ad in _start ()


Previous Comments:

[2012-08-16 14:09:36] fel...@php.net

Try disabling xdebug.


[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:
---
https://bugs.php.net/bug.php?id=62839&edit=1