|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2011-02-24 16:47 UTC] daniel dot buschke at nextiraone dot de
Description:
------------
Hi,
either the Bug (#42420) is still alive or it is re-alive. But I am not allowed to re-open it. So sorry for opening a dup.
php -v says:
------------------
PHP 5.2.17-pl0-gentoo (cli) (built: Feb 18 2011 10:01:58)
Copyright (c) 1997-2010 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
with Xdebug v2.1.0, Copyright (c) 2002-2010, by Derick Rethans
------------------
The PHP died with SegFault on two different machines with two different Proxies.
regards
Daniel
Test script:
---------------
<?php
$uri = 'ftp://pkg-shadow.alioth.debian.org/pub/pkg-shadow/shadow-4.1.4.3.tar.bz2';
$proxy = 'tcp://proxy:8080';
$opts = array(
'ftp' => array(
'proxy' => $proxy
)
);
$context = stream_context_create($opts);
stream_context_set_params($context, array());
$fh = fopen($uri, 'r', false, $context);
while (!feof($fh)) {
echo "foo\n";
fread($fh, 4 * 1024);
}
fclose($fh);
?>
Expected result:
----------------
many foos ;-) and no segmentation fault
Actual result:
--------------
many foos and segementation fault
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 15:00:02 2025 UTC |
BackTrace of 5.3-latest: #0 0x08394b84 in _php_stream_write_filtered (stream=0x8888ca0, buf=0x87431c6 "QUIT\r\n", count=6, flags=0) at /usr/src/php5.3-201102241530/main/streams/streams.c:1001 #1 0x08394d24 in _php_stream_write (stream=0x8888ca0, buf=0x87431c6 "QUIT\r\n", count=6) at /usr/src/php5.3-201102241530/main/streams/streams.c:1067 #2 0x0834cdc0 in php_stream_ftp_stream_close (wrapper=0x87768e8, stream=0x8888d10) at /usr/src/php5.3-201102241530/ext/standard/ftp_fopen_wrapper.c:120 #3 0x083938f3 in _php_stream_free (stream=0x8888d10, close_options=11) at /usr/src/php5.3-201102241530/main/streams/streams.c:376 #4 0x0839591f in stream_resource_regular_dtor (rsrc=0x8888e14) at /usr/src/php5.3-201102241530/main/streams/streams.c:1433 #5 0x083f715b in list_entry_destructor (ptr=0x8888e14) at /usr/src/php5.3-201102241530/Zend/zend_list.c:184 #6 0x083f47fe in zend_hash_del_key_or_index (ht=0x878e42c, arKey=0x0, nKeyLength=0, h=5, flag=1) at /usr/src/php5.3-201102241530/Zend/zend_hash.c:500 #7 0x083f6e49 in _zend_list_delete (id=5) at /usr/src/php5.3-201102241530/Zend/zend_list.c:58 #8 0x08300d78 in zif_fclose (ht=1, return_value=0x88884f8, return_value_ptr=0x0, this_ptr=0x0, return_value_used=0) at /usr/src/php5.3-201102241530/ext/standard/file.c:957 #9 0x084145de in zend_do_fcall_common_helper_SPEC (execute_data=0x88b5258) at /usr/src/php5.3-201102241530/Zend/zend_vm_execute.h:316 #10 0x08418122 in ZEND_DO_FCALL_SPEC_CONST_HANDLER (execute_data=0x88b5258) at /usr/src/php5.3-201102241530/Zend/zend_vm_execute.h:1606 #11 0x08413c7b in execute (op_array=0x8887010) at /usr/src/php5.3-201102241530/Zend/zend_vm_execute.h:107 #12 0x083e6f23 in zend_execute_scripts (type=8, retval=0x0, file_count=3) at /usr/src/php5.3-201102241530/Zend/zend.c:1194 #13 0x0837de64 in php_execute_script (primary_file=0xbffff12c) at /usr/src/php5.3-201102241530/main/main.c:2268 #14 0x084aa2f8 in main (argc=2, argv=0xbffff2a4) at /usr/src/php5.3-201102241530/sapi/cli/php_cli.c:1193