Test: /ext/curl/tests/bug54798.phpt - Version 7.4.21        

Bug #54798 Segfault when CURLOPT_STDERR file pointer is closed before calling curl_exec
Submitted: 2011-05-17 16:25:32 Modified: 2011-09-12 09:19:17
From: shein Assigned: bjori
Status: Closed Package: cURL related
PHP Version: trunk-SVN-2011-05-17 (SVN) OS: Ubuntu Linux 11.04 x86

There are 2 different diffs reported by users for this test.

Count Diff
1 (50%)
001+ Warning: curl_exec(): CURLOPT_STDERR resource has gone away, resetting to stderr in %s/bug54798.php on line 24 002+ * Rebuilt URL to: localhost:8964/ 003+ * Trying 10.3.254.12... 004+ * TCP_NODELAY set 005+ * Connected to (nil) (10.3.254.12) port 3128 (#0) 006+ * Proxy auth using Basic with user 'ldap_user' 007+ > GET http://localhost:8964/ HTTP/1.1 008+ Host: localhost:8964 009+ Proxy-Authorization: Basic bGRhcF91c2VyOjRDZlZiMTR4 010+ Accept: */* 011+ Proxy-Connection: Keep-Alive 001- %AOk for CURLOPT_STDERR 003- %AOk for CURLOPT_WRITEHEADER 005- %AHello World! 006- Hello World!Ok for CURLOPT_FILE 008- %AOk for CURLOPT_INFILE 009- ===DONE=== 013+ * HTTP 1.0, assume close after body 014+ < HTTP/1.0 504 Gateway Timeout 015+ < Pragma: no-cache 016+ < Connection: close 017+ < Content-Type: text/html; charset=utf-8 018+ < 019+ * Curl_http_done: called premature == 0 020+ * Closing connection 0 021+ Ok for CURLOPT_STDERR 023+ Warning: curl_exec(): CURLOPT_WRITEHEADER resource has gone away, resetting to default in %s/bug54798.php on line 24 024+ Ok for CURLOPT_WRITEHEADER 026+ Warning: curl_exec(): CURLOPT_FILE resource has gone away, resetting to default in %s/bug54798.php on line 24 027+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 028+ <html> 029+ <head> 030+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 031+ <title>Connection to server failed</title> 032+ <style type="text/css"> 033+ <!-- 034+ body { 035+ font-family: sans-serif; 036+ padding: 1em; 037+ } 038+ .mainBody { 039+ max-width: 600px; 040+ margin: auto; 041+ } 042+ .header { 043+ border-bottom: 3px solid #e73a27; 044+ line-height: 1.5em; 045+ padding-bottom: 1em; 046+ } 047+ h1 { 048+ color: #808080; 049+ font-size: 1.5em; 050+ line-height: 1em; 051+ } 052+ span { 053+ color: #000000; 054+ font-size: 1em; 055+ } 056+ .footer { 057+ text-align: right; 058+ padding-top: 3px; 059+ color: #808080; 060+ font-weight: bold; 061+ } 062+ .footer i { 063+ font-style: normal; 064+ } 065+ .nocss { 066+ display: none; 067+ } 068+ --> 069+ </style> 070+ </head> 071+ <body> 072+ <div class="mainBody"> 073+ <div class="header"> 074+ <h1>Connection to server failed</h1> 075+ <span>Connection actively refused by the server</span> 076+ </div> 077+ <div class="footer"><span class='nocss'><br /></span><i>This message was created by Kerio Control Proxy</i></div> 078+ </div> 079+ </body> 080+ </html> 081+ Ok for CURLOPT_FILE 082+ 083+ Warning: curl_exec(): CURLOPT_INFILE resource has gone away, resetting to default in %s/bug54798.php on line 24 084+ Ok for CURLOPT_INFILE 085+ ===DONE===
1 (50%)
001+ Server is not running 001- %AOk for CURLOPT_STDERR 002- 003- %AOk for CURLOPT_WRITEHEADER 004- 005- %AHello World! 006- Hello World!Ok for CURLOPT_FILE 007- 008- %AOk for CURLOPT_INFILE 009- ===DONE===