Bug #71703 [Opn->Fbk]: Segfault when CURLOPT_HTTPHEADER empty array and reset

From: Date: Thu, 31 Mar 2016 18:55:58 +0000
Subject: Bug #71703 [Opn->Fbk]: Segfault when CURLOPT_HTTPHEADER empty array and reset
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-200272@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
 Updated by:         krakjoe@php.net
 Reported by:        giel at cyclesoftware dot nl
 Summary:            Segfault when CURLOPT_HTTPHEADER empty array and
                     reset
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            cURL related
 Operating System:   Ubuntu
 PHP Version:        7.0.3
 Block user comment: N
 Private report:     N

 New Comment:

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 too cannot reproduce this.


Previous Comments:
------------------------------------------------------------------------
[2016-03-02 20:11:25] giel at cyclesoftware dot nl

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!

------------------------------------------------------------------------
[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


Thread (5 messages)

« previous php.bugs (#200272) next »