Edit report at https://bugs.php.net/bug.php?id=71709&edit=1
ID: 71709
Updated by: pierrick@php.net
Reported by: kspen72 at gmail dot com
Summary: make test ext/curl/tests/curl_setopt_basic003.phpt
never completes
-Status: Verified
+Status: Closed
Type: Bug
Package: cURL related
Operating System: Debian 3.2.73-2+deb7u2 x86_64
PHP Version: 7.0.4
Assigned To: pierrick
Block user comment: N
Private report: N
New Comment:
Automatic comment on behalf of pierrick
Revision: http://git.php.net/?p=php-src.git;a=commit;h=24d8f6ed7c583c82d6ed63080d235474f8afec6a
Log: Fixed bug #71709
Previous Comments:
------------------------------------------------------------------------
[2016-07-26 13:12:00] cmb@php.net
> -f-tree-tail-merge
Should of course have been -ftree-tail-merge.
------------------------------------------------------------------------
[2016-07-26 12:22:26] cmb@php.net
> Using Debian 7.10 and 7.0.8 built with gcc 4.7.2, this minimal> test case would crash:
I can reproduce this (same environment).
> Our fix was to edit the Makefile to compile ext/curl/interface.c> with -O0.-O1 also works for me, and also -O2 -fno-tree-tail-merge.
Not sure if there's really an issue with -f-tree-tail-merge in gcc
4.7.2, but at least disabling this option might be a viable
workaround.
------------------------------------------------------------------------
[2016-07-26 02:52:16] chrisbolt at gmail dot com
Just to add another data point, we ran into this in our production environment, not just a test
failure (see also https://bugs.php.net/bug.php?id=71703). Using
Debian 7.10 and 7.0.8 built with gcc 4.7.2, this minimal test case would crash:
<?php
$ch = curl_init('http://www.google.com/');
curl_setopt($ch, CURLOPT_HTTPHEADER, array());
?>
Our fix was to edit the Makefile to compile ext/curl/interface.c with -O0.
------------------------------------------------------------------------
[2016-06-24 18:19:20] cmb@php.net
I can confirm the issue on a bento/debian-7.10 vagrant box
with the official PHP 7.0.8. Running
./configure --disable-all --enabli-cli --with-curl
make
and then running the test stalls. Setting a breakpoint on
_php_curl_setopt shows erratic program flow in gdb (might be due
to wrong macro expansion).
After
make clean
./configure --disable-all --enabli-cli --with-curl --enable-debug
make
the test runs as expected.
------------------------------------------------------------------------
[2016-06-24 13:03:03] cmb@php.net
Thanks for the backtrace and for testing the patch. Indeed, there
appears to be something terribly wrong, because the segfault is
happening when PHP is processing curl_setopt(â¦,
CURLOPT_PROGRESSFUNCTION)[1], which is not supposed to happen
during this test. I'll try to reproduce the issue.
[1] <https://github.com/php/php-src/blob/php-7.0.8/ext/curl/interface.c#L2822>
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=71709
--
Edit this bug report at https://bugs.php.net/bug.php?id=71709&edit=1