Bug #71703 [Fbk->Opn]: Segfault when CURLOPT_HTTPHEADER empty array and reset
| From: | giel at cyclesoftware dot nl | Date: | Wed, 02 Mar 2016 20:11:28 +0000 |
| Subject: | Bug #71703 [Fbk->Opn]: Segfault when CURLOPT_HTTPHEADER empty array and reset | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-199568@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=71703&edit=1
ID: 71703
User updated by: giel at cyclesoftware dot nl
Reported by: giel at cyclesoftware dot nl
Summary: Segfault when CURLOPT_HTTPHEADER empty array and
reset
-Status: Feedback
+Status: Open
Type: Bug
Package: cURL related
Operating System: Ubuntu
PHP Version: 7.0.3
Block user comment: N
Private report: N
New Comment:
Unfortunately I cannot make the trace.
I tried this again with a new build (to enable debugging). Now the segfault is gone.
Must say that the segfault was during a prof-gen build.
Thanks!
Previous Comments:
------------------------------------------------------------------------
[2016-03-02 17:03:30] laruence@php.net
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.
I can not reproduce this
------------------------------------------------------------------------
[2016-03-02 16:14:40] giel at cyclesoftware dot nl
Description:
------------
When the following code is executed it segfaults. Removing curl_setopt($ch, CURLOPT_HTTPHEADER,
array()); fixes the problem.
Test script:
---------------
<?php
$uri = "http://www.google.com";
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $uri);
curl_setopt($ch, CURLOPT_HTTPHEADER, array());
curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'User-Agent:Mozilla/5.0 (Windows NT 6.1; WOW64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.85 Safari/537.36',));
?>
Actual result:
--------------
segfault
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=71703&edit=1