#39570 [NEW]: https Segmentation fault

From: Date: Tue, 21 Nov 2006 14:04:51 +0000
Subject: #39570 [NEW]: https Segmentation fault
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-105251@lists.php.net to get a copy of this message
From: danilo69 at gmail dot com Operating system: Linux x86_64 PHP version: 5.2.0 PHP Bug Type: cURL related Bug description: https Segmentation fault 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 bug report at http://bugs.php.net/?id=39570&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39570&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39570&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39570&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=39570&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=39570&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=39570&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=39570&r=needscript Try newer version: http://bugs.php.net/fix.php?id=39570&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=39570&r=support Expected behavior: http://bugs.php.net/fix.php?id=39570&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=39570&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=39570&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=39570&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39570&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=39570&r=dst IIS Stability: http://bugs.php.net/fix.php?id=39570&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=39570&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=39570&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=39570&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=39570&r=mysqlcfg

« previous php.bugs (#105251) next »