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

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+ * Uses proxy env variable all_proxy == 'http://10.81.254.21:3128' 003+ * Trying 10.81.254.21:3128... 004+ * Connected to 10.81.254.21 (10.81.254.21) port 3128 (#0) 005+ > GET http://localhost:8964/ HTTP/1.1 006+ Host: localhost:8964 007+ Accept: */* 008+ Proxy-Connection: Keep-Alive 001- %AOk for CURLOPT_STDERR 003- %AOk for CURLOPT_WRITEHEADER 004- 005- %AHello World! 006- Hello World!Ok for CURLOPT_FILE 007- 008- %AOk for CURLOPT_INFILE 009- ===DONE=== 010+ * Mark bundle as not supporting multiuse 011+ * HTTP 1.0, assume close after body 012+ < HTTP/1.0 403 Forbidden 013+ < Server: squid/3.1.10 014+ < Mime-Version: 1.0 015+ < Date: Tue, 09 Nov 2021 03:16:43 GMT 016+ < Content-Type: text/html 017+ < Content-Length: 3152 018+ < X-Squid-Error: ERR_ACCESS_DENIED 0 019+ < Vary: Accept-Language 020+ < Content-Language: en 021+ < X-Cache: MISS from 10.81.254.59 022+ < X-Cache-Lookup: NONE from 10.81.254.59:3128 023+ < Via: 1.0 10.81.254.59 (squid/3.1.10) 024+ * HTTP/1.0 connection set to keep alive! 025+ < Connection: keep-alive 026+ < 027+ * Connection #0 to host 10.81.254.21 left intact 028+ Ok for CURLOPT_STDERR 029+ 030+ Warning: curl_exec(): CURLOPT_WRITEHEADER resource has gone away, resetting to default in %s/bug54798.php on line 24 031+ Ok for CURLOPT_WRITEHEADER 032+ 033+ Warning: curl_exec(): CURLOPT_FILE resource has gone away, resetting to default in %s/bug54798.php on line 24 034+ <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> 035+ <html><head> 036+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> 037+ <title>ERROR: The requested URL could not be retrieved</title> 038+ <style type="text/css"><!-- 039+ /* 040+ Stylesheet for Squid Error pages 041+ Adapted from design by Free CSS Templates 042+ http://www.freecsstemplates.org 043+ Released for free under a Creative Commons Attribution 2.5 License 044+ */ 045+ 046+ /* Page basics */ 047+ * { 048+ font-family: verdana, sans-serif; 049+ } 050+ 051+ html body { 052+ margin: 0; 053+ padding: 0; 054+ background: #efefef; 055+ font-size: 12px; 056+ color: #1e1e1e; 057+ } 058+ 059+ /* Page displayed title area */ 060+ #titles { 061+ margin-left: 15px; 062+ padding: 10px; 063+ padding-left: 100px; 064+ background: url('http://www.squid-cache.org/Artwork/SN.png') no-repeat left; 065+ } 066+ 067+ /* initial title */ 068+ #titles h1 { 069+ color: #000000; 070+ } 071+ #titles h2 { 072+ color: #000000; 073+ } 074+ 075+ /* special event: FTP success page titles */ 076+ #titles ftpsuccess { 077+ background-color:#00ff00; 078+ width:100%; 079+ } 080+ 081+ /* Page displayed body content area */ 082+ #content { 083+ padding: 10px; 084+ background: #ffffff; 085+ } 086+ 087+ /* General text */ 088+ p { 089+ } 090+ 091+ /* error brief description */ 092+ #error p { 093+ } 094+ 095+ /* some data which may have caused the problem */ 096+ #data { 097+ } 098+ 099+ /* the error message received from the system or other software */ 100+ #sysmsg { 101+ } 102+ 103+ pre { 104+ font-family:sans-serif; 105+ } 106+ 107+ /* special event: FTP / Gopher directory listing */ 108+ #dirmsg { 109+ font-family: courier; 110+ color: black; 111+ font-size: 10pt; 112+ } 113+ #dirlisting { 114+ margin-left: 2%; 115+ margin-right: 2%; 116+ } 117+ #dirlisting tr.entry td.icon,td.filename,td.size,td.date { 118+ border-bottom: groove; 119+ } 120+ #dirlisting td.size { 121+ width: 50px; 122+ text-align: right; 123+ padding-right: 5px; 124+ } 125+ 126+ /* horizontal lines */ 127+ hr { 128+ margin: 0; 129+ } 130+ 131+ /* page displayed footer area */ 132+ #footer { 133+ font-size: 9px; 134+ padding-left: 10px; 135+ } 136+ 137+ 138+ body 139+ :lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sans-serif; float: right; } 140+ :lang(he) { direction: rtl; float: right; } 141+ --></style> 142+ </head><body> 143+ <div id="titles"> 144+ <h1>ERROR</h1> 145+ <h2>The requested URL could not be retrieved</h2> 146+ </div> 147+ <hr> 148+ 149+ <div id="content"> 150+ <p>The following error was encountered while trying to retrieve the URL: <a href="http://localhost:8964/">http://localhost:8964/</a></p> 151+ 152+ <blockquote id="error"> 153+ <p><b>Access Denied.</b></p> 154+ </blockquote> 155+ 156+ <p>Access control configuration prevents your request from being allowed at this time. Please contact your service provider if you feel this is incorrect.</p> 157+ 158+ <p>Your cache administrator is <a href="mailto:hongze@staff.sina.com.cn?subject=CacheErrorInfo%20-%20ERR_ACCESS_DENIED&amp;body=CacheHost%3A%2010.81.254.59%0D%0AErrPage%3A%20ERR_ACCESS_DENIED%0D%0AErr%3A%20%5Bnone%5D%0D%0ATimeStamp%3A%20Tue,%2009%20Nov%202021%2003%3A16%3A43%20GMT%0D%0A%0D%0AClientIP%3A%2010.235.61.14%0D%0A%0D%0AHTTP%20Request%3A%0D%0AGET%20%2F%20HTTP%2F1.1%0AHost%3A%20localhost%3A8964%0D%0AAccept%3A%20*%2F*%0D%0AProxy-Connection%3A%20Keep-Alive%0D%0A%0D%0A%0D%0A">hongze@staff.sina.com.cn</a>.</p> 159+ <br> 160+ </div> 161+ 162+ <hr> 163+ <div id="footer"> 164+ <p>Generated Tue, 09 Nov 2021 03:16:43 GMT by 10.81.254.59 (squid/3.1.10)</p> 165+ <!-- ERR_ACCESS_DENIED --> 166+ </div> 167+ </body></html> 168+ Ok for CURLOPT_FILE 169+ 170+ Warning: curl_exec(): CURLOPT_INFILE resource has gone away, resetting to default in %s/bug54798.php on line 24 171+ Ok for CURLOPT_INFILE 172+ ===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===