#33559 [NEW]: curl_close gives a seg fault when used on a multi cURL resource
| From: | dev at null dot com | Date: | Mon, 04 Jul 2005 00:36:57 +0000 |
| Subject: | #33559 [NEW]: curl_close gives a seg fault when used on a multi cURL resource | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-81341@lists.php.net to get a copy of this message | ||
From: dev at null dot com
Operating system: Redhat 9
PHP version: 5.0.4
PHP Bug Type: Unknown/Other Function
Bug description: curl_close gives a seg fault when used on a multi cURL resource
Description:
------------
A common oversight if migrating from a normal cURL interface to multi-curl
is leaving in a curl_close() command. This causes a PHP seg fault if
performed after curl_multi_remove_handle. The problem was not reproducible
all the time - one key to it being reproduced was having
a. Multiple cURL handles
b. Closing the first $mh using curl_multi_close; then followed by a new
curl_multi_init.
This may be fixed in the CVS (re #33222 - a similar but not identical
problem with the function) - I am not sure.
Reproduce code:
---------------
$mh = curl_multi_init();
... curl_multi_exec etc.
curl_multi_remove_handle($mh,$ch);
// seg fault here:
curl_close($ch);
Expected result:
----------------
Should give a graceful error, not a seg fault.
Actual result:
--------------
seg fault
--
Edit bug report at http://bugs.php.net/?id=33559&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=33559&r=trysnapshot4
Try a CVS snapshot (php5.0): http://bugs.php.net/fix.php?id=33559&r=trysnapshot50
Try a CVS snapshot (php5.1): http://bugs.php.net/fix.php?id=33559&r=trysnapshot51
Fixed in CVS: http://bugs.php.net/fix.php?id=33559&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=33559&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=33559&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=33559&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=33559&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33559&r=support
Expected behavior: http://bugs.php.net/fix.php?id=33559&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=33559&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=33559&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=33559&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=33559&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=33559&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=33559&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33559&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=33559&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=33559&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=33559&r=mysqlcfg