#40635 [Opn->Csd]: segfault in curl extension
| From: | tony2001@php.net | Date: | Mon, 26 Feb 2007 09:14:43 +0000 |
| Subject: | #40635 [Opn->Csd]: segfault in curl extension | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-109523@lists.php.net to get a copy of this message | ||
ID: 40635
Updated by: tony2001@php.net
Reported By: shar at cflash dot com
-Status: Open
+Status: Closed
Bug Type: cURL related
Operating System: FreeBSD 4.11, 6.2
PHP Version: 4.4.6RC1
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2007-02-26 05:36:00] shar at cflash dot com
Description:
------------
php segfaults on curl_exec, 2nd call in the sample code. Crashes with
4.4.5 and STABLE-200702260130 snapshot.
Reproduce code:
---------------
<?
$url="http://www.php.net/";
$l = curl_init ();
curl_setopt ($l, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($l, CURLOPT_URL, "{$url}/index.php");
curl_exec ($l);
curl_setopt ($l, CURLOPT_URL, $url);
$r = curl_exec ($l);
?>
Expected result:
----------------
run w/o segfault
Actual result:
--------------
#0 0x80eb7fc in _erealloc (ptr=0x81be024, size=28520, allow_failure=0,
__zend_filename=0x28289ba0
"/usr/local/include/php/ext/standard/php_smart_str.h",
__zend_lineno=83, __zend_orig_filename=0x0, __zend_orig_lineno=0)
at
/usr/ports-current/ports/lang/php4/work/php4-STABLE-200702260130/Zend/zend_alloc.c:350
350 REMOVE_POINTER_FROM_LIST(p);
#1 0x28286bc2 in curl_write (
data=0x81b55b4 "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0
Strict//EN\"\n
", ' ' <repeats 22 times>,
"\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\
">\n<html xmlns=\"http://www.w3.org/1999/xhtml\"
xml:lang=\"en\"
lang=\"en\">\n"..., size=1, nmemb=1076, ctx=0x81a8a24)
at /usr/local/include/php/ext/standard/php_smart_str.h:83
83 smart_str_alloc(dest, len, what);
#2 0x2829cb6c in Curl_client_write () from
/usr/local/lib/libcurl.so.4
#3 0x282b05b9 in Curl_httpchunk_read () from
/usr/local/lib/libcurl.so.4
#4 0x282ae389 in Curl_readwrite () from /usr/local/lib/libcurl.so.4
#5 0x282aefda in Transfer () from /usr/local/lib/libcurl.so.4
#6 0x282af90f in Curl_perform () from /usr/local/lib/libcurl.so.4
#7 0x282afea5 in curl_easy_perform () from
/usr/local/lib/libcurl.so.4
#8 0x28288fbf in zif_curl_exec (ht=1, return_value=0x81b3724,
this_ptr=0x0,
return_value_used=1)
at
/usr/ports-current/ports/ftp/php4-curl/work/php4-STABLE-200702260130/ext/curl/curl.c:1294
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=40635&edit=1