#39570 [Opn->Fbk]: https Segmentation fault
| From: | tony2001@php.net | Date: | Tue, 21 Nov 2006 14:08:35 +0000 |
| Subject: | #39570 [Opn->Fbk]: https Segmentation fault | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-105252@lists.php.net to get a copy of this message | ||
ID: 39570
Updated by: tony2001@php.net
Reported By: danilo69 at gmail dot com
-Status: Open
+Status: Feedback
Bug Type: cURL related
Operating System: Linux x86_64
PHP Version: 5.2.0
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.
Previous Comments:
------------------------------------------------------------------------
[2006-11-21 14:04:51] danilo69 at gmail dot com
Description:
------------
https curl crash (segfault)
Reproduce code:
---------------
<?php
$rCurlHandle = curl_init('https://xxxxxx');
$aParam = array();
curl_setopt($rCurlHandle, CURLOPT_VERBOSE, 1);
curl_setopt($rCurlHandle, CURLOPT_TIMEOUT, 60);
curl_setopt($rCurlHandle, CURLOPT_CONNECTTIMEOUT, 60);
curl_setopt($rCurlHandle, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($rCurlHandle, CURLOPT_HEADER, 0);
curl_setopt($rCurlHandle, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($rCurlHandle, CURLOPT_HTTPHEADER, array("Connection:
close"));
curl_setopt($rCurlHandle, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($rCurlHandle, CURLOPT_POST, 1);
curl_setopt($rCurlHandle, CURLOPT_POSTFIELDS,
http_build_query($aParam));
if (array_key_exists('HTTP_USER_AGENT', $_SERVER))
{
curl_setopt($rCurlHandle, CURLOPT_USERAGENT,
$_SERVER['HTTP_USER_AGENT']);
}
print 'pre exec';
$sResponse = curl_exec($rCurlHandle);
print 'post exec';
curl_close($rCurlHandle);
print 'post close';
?>
Expected result:
----------------
no crash
Actual result:
--------------
pre exec* About to connect() to xxxxx port 443
* Trying xxxxx... * connected
* Connected to xxxxxx port 443
* successfully set certificate verify locations:
* CAfile: /usr/local/share/curl/curl-ca-bundle.crt
CApath: none
* SSL connection using
* Server certificate:
* subject: xxxxxx
* start date: 2006-04-18 12:58:10 GMT
* expire date: 2008-04-17 12:58:10 GMT
* issuer: /C=ZA/ST=Western Cape/L=Cape Town/O=Thawte Consulting
cc/OU=Certification Services Division/CN=Thawte Premium Server
CA/emailAddress=premium-server@thawte.com
* SSL certificate verify ok.
> POST xxxx HTTP/1.1
Host: xxx
Accept: */*
Connection: close
Content-Length: 129
Content-Type: application/x-www-form-urlencoded
abc=123< HTTP/1.1 200 OK
< Date: Tue, 21 Nov 2006 13:41:36 GMT
< Server: Apache
< Expires: Mon, 26 Jul 1997 05:00:00 GMT
< Last-Modified: Tue, 21 Nov 2006 13:41:36 GMT
< Cache-Control: no-cache, must-revalidate
< Pragma: no-cache
< Vary: Accept-Encoding
< Connection: close
< Transfer-Encoding: chunked
< Content-Type: text/plain; charset=utf-8
* Closing connection #0
*** glibc detected *** free(): invalid pointer: 0x000000318cc30af8 ***
Aborted
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=39570&edit=1