|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #46582 curl enabled PHP segfaulting with OpenSSL
Submitted: 2008-11-16 02:00 UTC Modified: 2008-11-17 23:13 UTC
From: Assigned:
Status: Not a bug Package: cURL related
PHP Version: 5CVS, 6CVS (2008-11-17) OS: *
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
New email:
PHP Version: OS:


 [2008-11-16 02:00 UTC]
This segfault only exists when PHP is compiled with Curl support. However, Curl is not being called when generating the segfault. Also, this happens only when libcurl has OpenSSL support but no segfault exists with GnuTLS support.

The following bug is heavily related:

But it's labeled as pgsql centric, so this is an attempt to make this a known Curl + OpenSSL bug. Please feel free to relabel these bugs where they belong.

The configure line is:

./configure --enable-debug --with-curl --with-apxs2=/usr/bin/apxs2 --prefix=/home/user/php

Curl information:

cURL Information => libcurl/7.18.0 OpenSSL/0.9.8g zlib/ libidn/1.1

And for good measure, when Curl is compiled against the following there is no segfault:

cURL Information => libcurl/7.18.0 GnuTLS/2.0.4 zlib/ libidn/1.1

Reproduce code:
The exact code, in this case, is a simple svn call:

$url = '';

$blame = svn_blame($url);


Expected result:
No segfault

Actual result:
The code "works", but the core is dumped with the following backtrace:

(gdb) bt
#0  0xb73f7fb0 in ?? ()
#1  0xb7c6e1bd in ?? () from /usr/lib/i686/cmov/
#2  0xb7c6f98a in ERR_free_strings () from /usr/lib/i686/cmov/
#3  0xb7e8c487 in ?? () from /usr/lib/
#4  0xb7ea00a0 in ?? () from /usr/lib/
#5  0xb7e95733 in curl_global_cleanup () from /usr/lib/
#6  0x08085c2b in zm_shutdown_curl (type=1, module_number=23) at /home/user/php/php-5.3.0alpha2/ext/curl/interface.c:687
#7  0x082c1f4e in module_destructor (module=0x860cfb8) at /home/user/php/php-5.3.0alpha2/Zend/zend_API.c:2073
#8  0x082c93b8 in zend_hash_apply_deleter (ht=0x1, p=0x860cf88) at /home/user/php/php-5.3.0alpha2/Zend/zend_hash.c:611
#9  0x082c95f8 in zend_hash_graceful_reverse_destroy (ht=0x85d1be0) at /home/user/php/php-5.3.0alpha2/Zend/zend_hash.c:646
#10 0x082be87e in zend_shutdown () at /home/user/php/php-5.3.0alpha2/Zend/zend.c:768
#11 0x0826cddf in php_module_shutdown () at /home/user/php/php-5.3.0alpha2/main/main.c:1955
#12 0x0834561e in main (argc=2, argv=0xbfc859e4) at /home/user/php/php-5.3.0alpha2/sapi/cli/php_cli.c:1325


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2008-11-17 23:13 UTC]
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

From the backtrace this appears to be an openssl lib bug not a PHP one.
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Wed Mar 03 02:01:24 2021 UTC