Bug #64177 [Opn->Asn]: curl_multi_* crash with libcurl 7.29.0
| From: | pajoye@php.net | Date: | Fri, 15 Feb 2013 09:32:47 +0000 |
| Subject: | Bug #64177 [Opn->Asn]: curl_multi_* crash with libcurl 7.29.0 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-176640@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=64177&edit=1
ID: 64177
Updated by: pajoye@php.net
Reported by: ab@php.net
Summary: curl_multi_* crash with libcurl 7.29.0
-Status: Open
+Status: Assigned
Type: Bug
Package: cURL related
Operating System: any
PHP Version: Irrelevant
-Assigned To:
+Assigned To: ab
Block user comment: N
Private report: N
New Comment:
This commit may fix this regression:
https://github.com/bagder/curl/commit/da3fc1ee91de656a30f3a12de394bcba55119872
@a please patch our libcurl and test again :)
Previous Comments:
------------------------------------------------------------------------
[2013-02-08 23:31:40] ab@php.net
Description:
------------
Perhaps that's a libcurl bug, but the curl extension multi functionality consistently fails
with 7.29.0 . For instance this snippet based on ext/curl/tests/curl_multi_init_basic.phpt
$mh = curl_multi_init();
curl_multi_close($mh);
Basically it does crash always if no handles were added between init and cleanup. Ther corresponding
snippet in c
#include <curl/curl.h>
int main(void)
{
CURLM *multi_handle;
multi_handle = curl_multi_init();
curl_multi_cleanup(multi_handle);
return 0;
}
That snippets do successfully work with the libcurl versions prior to 7.29.0 . The issue introduces
itself starting with this commit in libcurl included in 7.29.0
https://github.com/bagder/curl/commit/c43127414d89ccb9ef6517081f68986d991bcfb3#L10R1776
And the commit is related to a big change explaned here http://daniel.haxx.se/blog/2013/01/17/internally-were-all-multi-now/
The issue is consistently reproduceable on linux and windows through all PHP versions.
Expected result:
----------------
no crash
Actual result:
--------------
#0 _php_curl_multi_close (rsrc=0xb707259c) at
/home/weltling/dws/src/php-5.5-nts/ext/curl/multi.c:349
#1 0x085902ff in list_entry_destructor (ptr=0xb707259c) at
/home/weltling/dws/src/php-5.5-nts/Zend/zend_list.c:183
#2 0x0858d72e in zend_hash_del_key_or_index (ht=0x8aa7158, arKey=0x0, nKeyLength=0, h=4, flag=1)
at /home/weltling/dws/src/php-5.5-nts/Zend/zend_hash.c:531
#3 0x0858ffed in _zend_list_delete (id=4) at /home/weltling/dws/src/php-5.5-nts/Zend/zend_list.c:57
#4 0x081d1d8b in zif_curl_multi_close (ht=1, return_value=0xb7070b3c, return_value_ptr=0x0,
this_ptr=0x0,
return_value_used=0) at /home/weltling/dws/src/php-5.5-nts/ext/curl/multi.c:330
#5 0x085b7f4b in zend_do_fcall_common_helper_SPEC (execute_data=0xb70540c4)
at /home/weltling/dws/src/php-5.5-nts/Zend/zend_vm_execute.h:542
#6 0x085bdc7b in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0xb70540c4)
at /home/weltling/dws/src/php-5.5-nts/Zend/zend_vm_execute.h:2293
#7 0x085b695c in execute_ex (execute_data=0xb70540c4) at
/home/weltling/dws/src/php-5.5-nts/Zend/zend_vm_execute.h:356
#8 0x085b7023 in zend_execute (op_array=0xb70713a8) at
/home/weltling/dws/src/php-5.5-nts/Zend/zend_vm_execute.h:381
#9 0x0857ed2d in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /home/weltling/dws/src/php-5.5-nts/Zend/zend.c:1316
#10 0x085023ec in php_execute_script (primary_file=0xbfffdff0) at
/home/weltling/dws/src/php-5.5-nts/main/main.c:2479
#11 0x086a7d59 in do_cli (argc=2, argv=0xbffff284) at
/home/weltling/dws/src/php-5.5-nts/sapi/cli/php_cli.c:988
#12 0x086a8ec3 in main (argc=2, argv=0xbffff284) at
/home/weltling/dws/src/php-5.5-nts/sapi/cli/php_cli.c:1364
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=64177&edit=1