|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2019-03-26 16:35 UTC] mike@php.net
-Status: Open
+Status: Feedback
[2019-03-26 16:35 UTC] mike@php.net
[2019-04-07 04:22 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Nov 05 20:00:01 2025 UTC |
Description: ------------ php 5.6.24 with curl and mysql extension segfaults when I attempt to retrieve an https document. http and other protocols work fine. Everything was built from sources using gcc 4.8.0 on a SPARC/Solaris 10 platform. The crash can be triggered by invoking php at the command line with the test script below. The crash occurs shortly after the SSL certificates have been read. Here is an excerpt from truss (tool similar to strace): open64("/usr/local/gcc48/openssl/cert.pem", O_RDONLY) = 4 fstat64(4, 0xFFBFD770) = 0 brk(0x00DB1C40) = 0 brk(0x00DC1C40) = 0 fstat64(4, 0xFFBFD618) = 0 ioctl(4, TCGETA, 0xFFBFD6FC) Err#25 ENOTTY read(4, " # #\n # # B u n d l e".., 131072) = 131072 brk(0x00DC1C40) = 0 # ... many more brk system calls read(4, 0x00DA070C, 131072) = 0 llseek(4, 0, SEEK_CUR) = 250615 close(4) = 0 Incurred fault #6, FLTBOUNDS %pc = 0x004CA154 siginfo: SIGSEGV SEGV_ACCERR addr=0xFEF57A5C Received signal #11, SIGSEGV [default] siginfo: SIGSEGV SEGV_ACCERR addr=0xFEF57A5C Test script: --------------- <?php $ch = curl_init("https://de.wikipedia.org/wiki/Ulm"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_BINARYTRANSFER, true); if (!$content = curl_exec($ch)) { echo "FAILED:"; trigger_error(curl_error($ch)); } else { echo "OK:"; echo $content; } curl_close($ch); ?> Actual result: -------------- clonard$ gdb /usr/local/php-5.6.24/bin/php GNU gdb (GDB) 7.5.1 Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "sparc-sun-solaris2.10". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/local/php-5.6.24/bin/php...done. (gdb) run test.php Starting program: /usr/local/php-5.6.24/bin/php test.php [Thread debugging using libthread_db enabled] [New Thread 1 (LWP 1)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 1 (LWP 1)] 0x004ca154 in CRYPTO_add_lock () (gdb) where #0 0x004ca154 in CRYPTO_add_lock () #1 0x004c1a7c in ssl_cert_dup () #2 0x004c05a4 in SSL_new () #3 0xfef59858 in ossl_connect_common () from /usr/local/gcc48/lib/libcurl.so.4 #4 0xfef5b268 in Curl_ssl_connect_nonblocking () from /usr/local/gcc48/lib/libcurl.so.4 #5 0xfef1e148 in Curl_http_connect () from /usr/local/gcc48/lib/libcurl.so.4 #6 0xfef2cd18 in Curl_protocol_connect () from /usr/local/gcc48/lib/libcurl.so.4 #7 0xfef3fad8 in multi_runsingle () from /usr/local/gcc48/lib/libcurl.so.4 #8 0xfef40678 in curl_multi_perform () from /usr/local/gcc48/lib/libcurl.so.4 #9 0xfef38344 in curl_easy_perform () from /usr/local/gcc48/lib/libcurl.so.4 #10 0x0019c99c in zif_curl_exec (ht=1, return_value=0xb57a28, return_value_ptr=0xb3c87c, this_ptr=0x0, return_value_used=<optimized out>, tsrm_ls=0xb391f0) at /var/playground/ULMphp/src/php-5.6.24/ext/curl/interface.c:2986 #11 0x00496574 in zend_do_fcall_common_helper_SPEC (execute_data=0xb3c8d8, tsrm_ls=0xb391f0) at /var/playground/ULMphp/src/php-5.6.24/Zend/zend_vm_execute.h:558 #12 0x00410e6c in execute_ex (execute_data=0xb3c8d8, tsrm_ls=0xb391f0) at /var/playground/ULMphp/src/php-5.6.24/Zend/zend_vm_execute.h:363 #13 0x00493e90 in zend_execute (op_array=0xb57390, tsrm_ls=tsrm_ls@entry=0xb391f0) ---Type <return> to continue, or q <return> to quit--- at /var/playground/ULMphp/src/php-5.6.24/Zend/zend_vm_execute.h:388 #14 0x003d3d9c in zend_execute_scripts (type=type@entry=8, tsrm_ls=tsrm_ls@entry=0xb391f0, retval=retval@entry=0x0, file_count=file_count@entry=3) at /var/playground/ULMphp/src/php-5.6.24/Zend/zend.c:1341 #15 0x00359cb0 in php_execute_script ( primary_file=primary_file@entry=0xffbfee48, tsrm_ls=tsrm_ls@entry=0xb391f0) at /var/playground/ULMphp/src/php-5.6.24/main/main.c:2613 #16 0x0049875c in do_cli (argc=2, argv=0xb391a8, tsrm_ls=0xb391f0) at /var/playground/ULMphp/src/php-5.6.24/sapi/cli/php_cli.c:994 #17 0x0005cdf0 in main (argc=2, argv=<optimized out>) at /var/playground/ULMphp/src/php-5.6.24/sapi/cli/php_cli.c:1378 (gdb)