#38393 [Opn->Fbk]: Segmentation Fault when using curl_close in an object context
| From: | joey@php.net | Date: | Wed, 09 Aug 2006 05:56:50 +0000 |
| Subject: | #38393 [Opn->Fbk]: Segmentation Fault when using curl_close in an object context | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-100559@lists.php.net to get a copy of this message | ||
ID: 38393
Updated by: joey@php.net
Reported By: asubstitute at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: cURL related
Operating System: RHEL4
PHP Version: 5.1.4
New Comment:
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
for *NIX and
http://bugs.php.net/bugs-generating-backtrace-win32.php
for Win32
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
I could not reproduce this crash on debian i386, debian
amd64, or SLED 10 i386. Seeking backtrace.
Previous Comments:
------------------------------------------------------------------------
[2006-08-09 05:49:52] asubstitute at gmail dot com
Description:
------------
When I run "php /www/curltest.php" I see a Segmentation Fault. If I put
"echo $this->responseData" before the call to curl_close, I see the
response data. If I remove the call to curl_close, the script segfaults
at the end, due to curl_close being called automatically.
cURL was compiled from the newest tarball. This bug exists in the 5.2
snapshot too.
php -v : PHP 5.1.4 (cgi-fcgi) (built: Aug 9 2006 00:24:52)
Reproduce code:
---------------
class curlTest {
function __construct($url) {
$this->responseData = null;
$this->responseError = false;
$this->curl = curl_init();
curl_setopt($this->curl, CURLOPT_URL, $url);
}
function makeRequest() {
$this->responseData = curl_exec($this->curl);
curl_close($this->curl);
}
}
$interface = new curlTest("http://www.google.com/explanation.html");
$interface->makeRequest();
Expected result:
----------------
Nothing
Actual result:
--------------
Segmentation Fault
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=38393&edit=1