PHP  
 PHP_HEAD
downloads | QA | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
 

Valgrind Report for ext/ftp/tests/ftp_nb_get_large.phpt ('Testing ftp_nb_fget can handle large files incl. resume')

Script

1: <?php
2:
require 'server.inc';
3:
4:
$ftp ftp_connect('127.0.0.1'$port);
5:
ftp_login($ftp'user''pass');
6: if (!
$ftp) die("Couldn't connect to the server");
7:
8:
$local_file dirname(__FILE__) . DIRECTORY_SEPARATOR "ftp_nb_get_large.txt";
9:
touch($local_file);
10:
ftp_nb_get($ftp$local_file'fget_large.txt'FTP_BINARY5368709119);
11:
$fp fopen($local_file'r');
12:
fseek($fp5368709119);
13:
var_dump(fread($fp1));
14:
var_dump(filesize($local_file));
15:
fclose($fp);
16:
?>
17:

Report

==14527== Invalid read of size 8
==14527==    at 0xF0238D: _php_stream_free (streams.c:366)
==14527==    by 0x6C99FD: ftp_close (ftp.c:175)
==14527==    by 0x6C3C77: ftp_destructor_ftpbuf (php_ftp.c:315)
==14527==    by 0x10216EC: zend_resource_dtor (zend_list.c:74)
==14527==    by 0x1022113: zend_close_rsrc (zend_list.c:228)
==14527==    by 0x10177FE: zend_hash_reverse_apply (zend_hash.c:1836)
==14527==    by 0x102215F: zend_close_rsrc_list (zend_list.c:236)
==14527==    by 0xFAEC44: shutdown_executor (zend_execute_API.c:265)
==14527==    by 0xFE155A: zend_deactivate (zend.c:1152)
==14527==    by 0xECED79: php_request_shutdown (main.c:1932)
==14527==    by 0x122E45A: do_cli (php_cli.c:1164)
==14527==    by 0x122ED8F: main (php_cli.c:1389)
==14527==  Address 0x168fbc80 is 144 bytes inside a block of size 224 free'd
==14527==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==14527==    by 0xF73AC3: _efree (zend_alloc.c:2500)
==14527==    by 0xF02BCD: _php_stream_free (streams.c:504)
==14527==    by 0xF07195: stream_resource_regular_dtor (streams.c:1586)
==14527==    by 0x10216EC: zend_resource_dtor (zend_list.c:74)
==14527==    by 0x1022113: zend_close_rsrc (zend_list.c:228)
==14527==    by 0x10177FE: zend_hash_reverse_apply (zend_hash.c:1836)
==14527==    by 0x102215F: zend_close_rsrc_list (zend_list.c:236)
==14527==    by 0xFAEC44: shutdown_executor (zend_execute_API.c:265)
==14527==    by 0xFE155A: zend_deactivate (zend.c:1152)
==14527==    by 0xECED79: php_request_shutdown (main.c:1932)
==14527==    by 0x122E45A: do_cli (php_cli.c:1164)
==14527==  Block was alloc'd at
==14527==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==14527==    by 0xF777FD: __zend_malloc (zend_alloc.c:2896)
==14527==    by 0xF6F869: _emalloc_224 (zend_alloc.c:2413)
==14527==    by 0xF02054: _php_stream_alloc (streams.c:272)
==14527==    by 0xF10A01: _php_stream_fopen_from_fd_int (plain_wrapper.c:184)
==14527==    by 0xF10D3F: _php_stream_fopen_from_fd (plain_wrapper.c:246)
==14527==    by 0xF12F54: _php_stream_fopen (plain_wrapper.c:1054)
==14527==    by 0xF1355A: php_plain_files_stream_opener (plain_wrapper.c:1110)
==14527==    by 0xF0955B: _php_stream_open_wrapper_ex (streams.c:2024)
==14527==    by 0x6C6DE9: zif_ftp_nb_get (php_ftp.c:1040)
==14527==    by 0x11FF001: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:655)
==14527==    by 0x11FF001: execute_ex (zend_vm_execute.h:54811)
==14527==    by 0x122750B: zend_execute (zend_vm_execute.h:60215)
==14527== 
==14527== Invalid read of size 4
==14527==    at 0xF023DB: _php_stream_free (streams.c:369)
==14527==    by 0x6C99FD: ftp_close (ftp.c:175)
==14527==    by 0x6C3C77: ftp_destructor_ftpbuf (php_ftp.c:315)
==14527==    by 0x10216EC: zend_resource_dtor (zend_list.c:74)
==14527==    by 0x1022113: zend_close_rsrc (zend_list.c:228)
==14527==    by 0x10177FE: zend_hash_reverse_apply (zend_hash.c:1836)
==14527==    by 0x102215F: zend_close_rsrc_list (zend_list.c:236)
==14527==    by 0xFAEC44: shutdown_executor (zend_execute_API.c:265)
==14527==    by 0xFE155A: zend_deactivate (zend.c:1152)
==14527==    by 0xECED79: php_request_shutdown (main.c:1932)
==14527==    by 0x122E45A: do_cli (php_cli.c:1164)
==14527==    by 0x122ED8F: main (php_cli.c:1389)
==14527==  Address 0x168fbc64 is 116 bytes inside a block of size 224 free'd
==14527==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==14527==    by 0xF73AC3: _efree (zend_alloc.c:2500)
==14527==    by 0xF02BCD: _php_stream_free (streams.c:504)
==14527==    by 0xF07195: stream_resource_regular_dtor (streams.c:1586)
==14527==    by 0x10216EC: zend_resource_dtor (zend_list.c:74)
==14527==    by 0x1022113: zend_close_rsrc (zend_list.c:228)
==14527==    by 0x10177FE: zend_hash_reverse_apply (zend_hash.c:1836)
==14527==    by 0x102215F: zend_close_rsrc_list (zend_list.c:236)
==14527==    by 0xFAEC44: shutdown_executor (zend_execute_API.c:265)
==14527==    by 0xFE155A: zend_deactivate (zend.c:1152)
==14527==    by 0xECED79: php_request_shutdown (main.c:1932)
==14527==    by 0x122E45A: do_cli (php_cli.c:1164)
==14527==  Block was alloc'd at
==14527==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==14527==    by 0xF777FD: __zend_malloc (zend_alloc.c:2896)
==14527==    by 0xF6F869: _emalloc_224 (zend_alloc.c:2413)
==14527==    by 0xF02054: _php_stream_alloc (streams.c:272)
==14527==    by 0xF10A01: _php_stream_fopen_from_fd_int (plain_wrapper.c:184)
==14527==    by 0xF10D3F: _php_stream_fopen_from_fd (plain_wrapper.c:246)
==14527==    by 0xF12F54: _php_stream_fopen (plain_wrapper.c:1054)
==14527==    by 0xF1355A: php_plain_files_stream_opener (plain_wrapper.c:1110)
==14527==    by 0xF0955B: _php_stream_open_wrapper_ex (streams.c:2024)
==14527==    by 0x6C6DE9: zif_ftp_nb_get (php_ftp.c:1040)
==14527==    by 0x11FF001: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:655)
==14527==    by 0x11FF001: execute_ex (zend_vm_execute.h:54811)
==14527==    by 0x122750B: zend_execute (zend_vm_execute.h:60215)
==14527== 
==14527== Invalid read of size 1
==14527==    at 0xF02402: _php_stream_free (streams.c:382)
==14527==    by 0x6C99FD: ftp_close (ftp.c:175)
==14527==    by 0x6C3C77: ftp_destructor_ftpbuf (php_ftp.c:315)
==14527==    by 0x10216EC: zend_resource_dtor (zend_list.c:74)
==14527==    by 0x1022113: zend_close_rsrc (zend_list.c:228)
==14527==    by 0x10177FE: zend_hash_reverse_apply (zend_hash.c:1836)
==14527==    by 0x102215F: zend_close_rsrc_list (zend_list.c:236)
==14527==    by 0xFAEC44: shutdown_executor (zend_execute_API.c:265)
==14527==    by 0xFE155A: zend_deactivate (zend.c:1152)
==14527==    by 0xECED79: php_request_shutdown (main.c:1932)
==14527==    by 0x122E45A: do_cli (php_cli.c:1164)
==14527==    by 0x122ED8F: main (php_cli.c:1389)
==14527==  Address 0x168fbc50 is 96 bytes inside a block of size 224 free'd
==14527==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==14527==    by 0xF73AC3: _efree (zend_alloc.c:2500)
==14527==    by 0xF02BCD: _php_stream_free (streams.c:504)
==14527==    by 0xF07195: stream_resource_regular_dtor (streams.c:1586)
==14527==    by 0x10216EC: zend_resource_dtor (zend_list.c:74)
==14527==    by 0x1022113: zend_close_rsrc (zend_list.c:228)
==14527==    by 0x10177FE: zend_hash_reverse_apply (zend_hash.c:1836)
==14527==    by 0x102215F: zend_close_rsrc_list (zend_list.c:236)
==14527==    by 0xFAEC44: shutdown_executor (zend_execute_API.c:265)
==14527==    by 0xFE155A: zend_deactivate (zend.c:1152)
==14527==    by 0xECED79: php_request_shutdown (main.c:1932)
==14527==    by 0x122E45A: do_cli (php_cli.c:1164)
==14527==  Block was alloc'd at
==14527==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==14527==    by 0xF777FD: __zend_malloc (zend_alloc.c:2896)
==14527==    by 0xF6F869: _emalloc_224 (zend_alloc.c:2413)
==14527==    by 0xF02054: _php_stream_alloc (streams.c:272)
==14527==    by 0xF10A01: _php_stream_fopen_from_fd_int (plain_wrapper.c:184)
==14527==    by 0xF10D3F: _php_stream_fopen_from_fd (plain_wrapper.c:246)
==14527==    by 0xF12F54: _php_stream_fopen (plain_wrapper.c:1054)
==14527==    by 0xF1355A: php_plain_files_stream_opener (plain_wrapper.c:1110)
==14527==    by 0xF0955B: _php_stream_open_wrapper_ex (streams.c:2024)
==14527==    by 0x6C6DE9: zif_ftp_nb_get (php_ftp.c:1040)
==14527==    by 0x11FF001: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:655)
==14527==    by 0x11FF001: execute_ex (zend_vm_execute.h:54811)
==14527==    by 0x122750B: zend_execute (zend_vm_execute.h:60215)
==14527== 
==14527== Invalid read of size 1
==14527==    at 0xF02415: _php_stream_free (streams.c:384)
==14527==    by 0x6C99FD: ftp_close (ftp.c:175)
==14527==    by 0x6C3C77: ftp_destructor_ftpbuf (php_ftp.c:315)
==14527==    by 0x10216EC: zend_resource_dtor (zend_list.c:74)
==14527==    by 0x1022113: zend_close_rsrc (zend_list.c:228)
==14527==    by 0x10177FE: zend_hash_reverse_apply (zend_hash.c:1836)
==14527==    by 0x102215F: zend_close_rsrc_list (zend_list.c:236)
==14527==    by 0xFAEC44: shutdown_executor (zend_execute_API.c:265)
==14527==    by 0xFE155A: zend_deactivate (zend.c:1152)
==14527==    by 0xECED79: php_request_shutdown (main.c:1932)
==14527==    by 0x122E45A: do_cli (php_cli.c:1164)
==14527==    by 0x122ED8F: main (php_cli.c:1389)
==14527==  Address 0x168fbc50 is 96 bytes inside a block of size 224 free'd
==14527==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==14527==    by 0xF73AC3: _efree (zend_alloc.c:2500)
==14527==    by 0xF02BCD: _php_stream_free (streams.c:504)
==14527==    by 0xF07195: stream_resource_regular_dtor (streams.c:1586)
==14527==    by 0x10216EC: zend_resource_dtor (zend_list.c:74)
==14527==    by 0x1022113: zend_close_rsrc (zend_list.c:228)
==14527==    by 0x10177FE: zend_hash_reverse_apply (zend_hash.c:1836)
==14527==    by 0x102215F: zend_close_rsrc_list (zend_list.c:236)
==14527==    by 0xFAEC44: shutdown_executor (zend_execute_API.c:265)
==14527==    by 0xFE155A: zend_deactivate (zend.c:1152)
==14527==    by 0xECED79: php_request_shutdown (main.c:1932)
==14527==    by 0x122E45A: do_cli (php_cli.c:1164)
==14527==  Block was alloc'd at
==14527==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==14527==    by 0xF777FD: __zend_malloc (zend_alloc.c:2896)
==14527==    by 0xF6F869: _emalloc_224 (zend_alloc.c:2413)
==14527==    by 0xF02054: _php_stream_alloc (streams.c:272)
==14527==    by 0xF10A01: _php_stream_fopen_from_fd_int (plain_wrapper.c:184)
==14527==    by 0xF10D3F: _php_stream_fopen_from_fd (plain_wrapper.c:246)
==14527==    by 0xF12F54: _php_stream_fopen (plain_wrapper.c:1054)
==14527==    by 0xF1355A: php_plain_files_stream_opener (plain_wrapper.c:1110)
==14527==    by 0xF0955B: _php_stream_open_wrapper_ex (streams.c:2024)
==14527==    by 0x6C6DE9: zif_ftp_nb_get (php_ftp.c:1040)
==14527==    by 0x11FF001: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:655)
==14527==    by 0x11FF001: execute_ex (zend_vm_execute.h:54811)
==14527==    by 0x122750B: zend_execute (zend_vm_execute.h:60215)
==14527== 

 

Generated at Sat, 01 Dec 2018 10:41:11 +0000 (9 days ago)

Copyright © 2005-2018 The PHP Group
All rights reserved.