|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2006-11-21 14:08 UTC] tony2001@php.net
[2006-11-21 15:31 UTC] danilo69 at gmail dot com
[2006-11-21 15:42 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Nov 03 21:00:01 2025 UTC |
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