#40635 [NEW]: segfault in curl extension
| From: | shar at cflash dot com | Date: | Mon, 26 Feb 2007 05:36:00 +0000 |
| Subject: | #40635 [NEW]: segfault in curl extension | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-109517@lists.php.net to get a copy of this message | ||
From: shar at cflash dot com
Operating system: FreeBSD 4.11, 6.2
PHP version: 4.4.6RC1
PHP Bug Type: cURL related
Bug description: segfault in curl extension
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 bug report at http://bugs.php.net/?id=40635&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40635&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40635&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40635&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=40635&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=40635&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=40635&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=40635&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=40635&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=40635&r=support
Expected behavior: http://bugs.php.net/fix.php?id=40635&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=40635&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=40635&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=40635&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40635&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=40635&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=40635&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=40635&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=40635&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=40635&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=40635&r=mysqlcfg