PHP  
 PHP_7_2
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

==22810== Invalid read of size 8
==22810==    at 0x103E050: _php_stream_free (streams.c:373)
==22810==    by 0x82670E: ftp_close (ftp.c:177)
==22810==    by 0x8209F2: ftp_destructor_ftpbuf (php_ftp.c:317)
==22810==    by 0x1162675: zend_resource_dtor (zend_list.c:76)
==22810==    by 0x116309A: zend_close_rsrc (zend_list.c:230)
==22810==    by 0x11580E3: zend_hash_reverse_apply (zend_hash.c:1599)
==22810==    by 0x11630E6: zend_close_rsrc_list (zend_list.c:238)
==22810==    by 0x10EA9EC: shutdown_executor (zend_execute_API.c:263)
==22810==    by 0x111E748: zend_deactivate (zend.c:1032)
==22810==    by 0x100DF2D: php_request_shutdown (main.c:1904)
==22810==    by 0x13A38FE: do_cli (php_cli.c:1178)
==22810==    by 0x13A4233: main (php_cli.c:1403)
==22810==  Address 0x165b4040 is 144 bytes inside a block of size 224 free'd
==22810==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==22810==    by 0x10B3599: _efree (zend_alloc.c:2451)
==22810==    by 0x103E922: _php_stream_free (streams.c:517)
==22810==    by 0x1043014: stream_resource_regular_dtor (streams.c:1598)
==22810==    by 0x1162675: zend_resource_dtor (zend_list.c:76)
==22810==    by 0x116309A: zend_close_rsrc (zend_list.c:230)
==22810==    by 0x11580E3: zend_hash_reverse_apply (zend_hash.c:1599)
==22810==    by 0x11630E6: zend_close_rsrc_list (zend_list.c:238)
==22810==    by 0x10EA9EC: shutdown_executor (zend_execute_API.c:263)
==22810==    by 0x111E748: zend_deactivate (zend.c:1032)
==22810==    by 0x100DF2D: php_request_shutdown (main.c:1904)
==22810==    by 0x13A38FE: do_cli (php_cli.c:1178)
==22810==  Block was alloc'd at
==22810==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==22810==    by 0x10B4AFF: __zend_malloc (zend_alloc.c:2835)
==22810==    by 0x10AF2C1: _emalloc_224 (zend_alloc.c:2359)
==22810==    by 0x103DCAA: _php_stream_alloc (streams.c:274)
==22810==    by 0x104C1DA: _php_stream_fopen_from_fd_int (plain_wrapper.c:186)
==22810==    by 0x104C518: _php_stream_fopen_from_fd (plain_wrapper.c:248)
==22810==    by 0x104E62B: _php_stream_fopen (plain_wrapper.c:1021)
==22810==    by 0x104EB66: php_plain_files_stream_opener (plain_wrapper.c:1077)
==22810==    by 0x1045374: _php_stream_open_wrapper_ex (streams.c:2036)
==22810==    by 0x823B22: zif_ftp_nb_get (php_ftp.c:1042)
==22810==    by 0x1374D6C: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:577)
==22810==    by 0x1374D6C: execute_ex (zend_vm_execute.h:59775)
==22810==    by 0x139C8EE: zend_execute (zend_vm_execute.h:63804)
==22810== 
==22810== Invalid read of size 4
==22810==    at 0x103E09E: _php_stream_free (streams.c:376)
==22810==    by 0x82670E: ftp_close (ftp.c:177)
==22810==    by 0x8209F2: ftp_destructor_ftpbuf (php_ftp.c:317)
==22810==    by 0x1162675: zend_resource_dtor (zend_list.c:76)
==22810==    by 0x116309A: zend_close_rsrc (zend_list.c:230)
==22810==    by 0x11580E3: zend_hash_reverse_apply (zend_hash.c:1599)
==22810==    by 0x11630E6: zend_close_rsrc_list (zend_list.c:238)
==22810==    by 0x10EA9EC: shutdown_executor (zend_execute_API.c:263)
==22810==    by 0x111E748: zend_deactivate (zend.c:1032)
==22810==    by 0x100DF2D: php_request_shutdown (main.c:1904)
==22810==    by 0x13A38FE: do_cli (php_cli.c:1178)
==22810==    by 0x13A4233: main (php_cli.c:1403)
==22810==  Address 0x165b4024 is 116 bytes inside a block of size 224 free'd
==22810==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==22810==    by 0x10B3599: _efree (zend_alloc.c:2451)
==22810==    by 0x103E922: _php_stream_free (streams.c:517)
==22810==    by 0x1043014: stream_resource_regular_dtor (streams.c:1598)
==22810==    by 0x1162675: zend_resource_dtor (zend_list.c:76)
==22810==    by 0x116309A: zend_close_rsrc (zend_list.c:230)
==22810==    by 0x11580E3: zend_hash_reverse_apply (zend_hash.c:1599)
==22810==    by 0x11630E6: zend_close_rsrc_list (zend_list.c:238)
==22810==    by 0x10EA9EC: shutdown_executor (zend_execute_API.c:263)
==22810==    by 0x111E748: zend_deactivate (zend.c:1032)
==22810==    by 0x100DF2D: php_request_shutdown (main.c:1904)
==22810==    by 0x13A38FE: do_cli (php_cli.c:1178)
==22810==  Block was alloc'd at
==22810==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==22810==    by 0x10B4AFF: __zend_malloc (zend_alloc.c:2835)
==22810==    by 0x10AF2C1: _emalloc_224 (zend_alloc.c:2359)
==22810==    by 0x103DCAA: _php_stream_alloc (streams.c:274)
==22810==    by 0x104C1DA: _php_stream_fopen_from_fd_int (plain_wrapper.c:186)
==22810==    by 0x104C518: _php_stream_fopen_from_fd (plain_wrapper.c:248)
==22810==    by 0x104E62B: _php_stream_fopen (plain_wrapper.c:1021)
==22810==    by 0x104EB66: php_plain_files_stream_opener (plain_wrapper.c:1077)
==22810==    by 0x1045374: _php_stream_open_wrapper_ex (streams.c:2036)
==22810==    by 0x823B22: zif_ftp_nb_get (php_ftp.c:1042)
==22810==    by 0x1374D6C: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:577)
==22810==    by 0x1374D6C: execute_ex (zend_vm_execute.h:59775)
==22810==    by 0x139C8EE: zend_execute (zend_vm_execute.h:63804)
==22810== 
==22810== Invalid read of size 1
==22810==    at 0x103E0C5: _php_stream_free (streams.c:389)
==22810==    by 0x82670E: ftp_close (ftp.c:177)
==22810==    by 0x8209F2: ftp_destructor_ftpbuf (php_ftp.c:317)
==22810==    by 0x1162675: zend_resource_dtor (zend_list.c:76)
==22810==    by 0x116309A: zend_close_rsrc (zend_list.c:230)
==22810==    by 0x11580E3: zend_hash_reverse_apply (zend_hash.c:1599)
==22810==    by 0x11630E6: zend_close_rsrc_list (zend_list.c:238)
==22810==    by 0x10EA9EC: shutdown_executor (zend_execute_API.c:263)
==22810==    by 0x111E748: zend_deactivate (zend.c:1032)
==22810==    by 0x100DF2D: php_request_shutdown (main.c:1904)
==22810==    by 0x13A38FE: do_cli (php_cli.c:1178)
==22810==    by 0x13A4233: main (php_cli.c:1403)
==22810==  Address 0x165b4010 is 96 bytes inside a block of size 224 free'd
==22810==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==22810==    by 0x10B3599: _efree (zend_alloc.c:2451)
==22810==    by 0x103E922: _php_stream_free (streams.c:517)
==22810==    by 0x1043014: stream_resource_regular_dtor (streams.c:1598)
==22810==    by 0x1162675: zend_resource_dtor (zend_list.c:76)
==22810==    by 0x116309A: zend_close_rsrc (zend_list.c:230)
==22810==    by 0x11580E3: zend_hash_reverse_apply (zend_hash.c:1599)
==22810==    by 0x11630E6: zend_close_rsrc_list (zend_list.c:238)
==22810==    by 0x10EA9EC: shutdown_executor (zend_execute_API.c:263)
==22810==    by 0x111E748: zend_deactivate (zend.c:1032)
==22810==    by 0x100DF2D: php_request_shutdown (main.c:1904)
==22810==    by 0x13A38FE: do_cli (php_cli.c:1178)
==22810==  Block was alloc'd at
==22810==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==22810==    by 0x10B4AFF: __zend_malloc (zend_alloc.c:2835)
==22810==    by 0x10AF2C1: _emalloc_224 (zend_alloc.c:2359)
==22810==    by 0x103DCAA: _php_stream_alloc (streams.c:274)
==22810==    by 0x104C1DA: _php_stream_fopen_from_fd_int (plain_wrapper.c:186)
==22810==    by 0x104C518: _php_stream_fopen_from_fd (plain_wrapper.c:248)
==22810==    by 0x104E62B: _php_stream_fopen (plain_wrapper.c:1021)
==22810==    by 0x104EB66: php_plain_files_stream_opener (plain_wrapper.c:1077)
==22810==    by 0x1045374: _php_stream_open_wrapper_ex (streams.c:2036)
==22810==    by 0x823B22: zif_ftp_nb_get (php_ftp.c:1042)
==22810==    by 0x1374D6C: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:577)
==22810==    by 0x1374D6C: execute_ex (zend_vm_execute.h:59775)
==22810==    by 0x139C8EE: zend_execute (zend_vm_execute.h:63804)
==22810== 
==22810== Invalid read of size 1
==22810==    at 0x103E0D8: _php_stream_free (streams.c:391)
==22810==    by 0x82670E: ftp_close (ftp.c:177)
==22810==    by 0x8209F2: ftp_destructor_ftpbuf (php_ftp.c:317)
==22810==    by 0x1162675: zend_resource_dtor (zend_list.c:76)
==22810==    by 0x116309A: zend_close_rsrc (zend_list.c:230)
==22810==    by 0x11580E3: zend_hash_reverse_apply (zend_hash.c:1599)
==22810==    by 0x11630E6: zend_close_rsrc_list (zend_list.c:238)
==22810==    by 0x10EA9EC: shutdown_executor (zend_execute_API.c:263)
==22810==    by 0x111E748: zend_deactivate (zend.c:1032)
==22810==    by 0x100DF2D: php_request_shutdown (main.c:1904)
==22810==    by 0x13A38FE: do_cli (php_cli.c:1178)
==22810==    by 0x13A4233: main (php_cli.c:1403)
==22810==  Address 0x165b4010 is 96 bytes inside a block of size 224 free'd
==22810==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==22810==    by 0x10B3599: _efree (zend_alloc.c:2451)
==22810==    by 0x103E922: _php_stream_free (streams.c:517)
==22810==    by 0x1043014: stream_resource_regular_dtor (streams.c:1598)
==22810==    by 0x1162675: zend_resource_dtor (zend_list.c:76)
==22810==    by 0x116309A: zend_close_rsrc (zend_list.c:230)
==22810==    by 0x11580E3: zend_hash_reverse_apply (zend_hash.c:1599)
==22810==    by 0x11630E6: zend_close_rsrc_list (zend_list.c:238)
==22810==    by 0x10EA9EC: shutdown_executor (zend_execute_API.c:263)
==22810==    by 0x111E748: zend_deactivate (zend.c:1032)
==22810==    by 0x100DF2D: php_request_shutdown (main.c:1904)
==22810==    by 0x13A38FE: do_cli (php_cli.c:1178)
==22810==  Block was alloc'd at
==22810==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==22810==    by 0x10B4AFF: __zend_malloc (zend_alloc.c:2835)
==22810==    by 0x10AF2C1: _emalloc_224 (zend_alloc.c:2359)
==22810==    by 0x103DCAA: _php_stream_alloc (streams.c:274)
==22810==    by 0x104C1DA: _php_stream_fopen_from_fd_int (plain_wrapper.c:186)
==22810==    by 0x104C518: _php_stream_fopen_from_fd (plain_wrapper.c:248)
==22810==    by 0x104E62B: _php_stream_fopen (plain_wrapper.c:1021)
==22810==    by 0x104EB66: php_plain_files_stream_opener (plain_wrapper.c:1077)
==22810==    by 0x1045374: _php_stream_open_wrapper_ex (streams.c:2036)
==22810==    by 0x823B22: zif_ftp_nb_get (php_ftp.c:1042)
==22810==    by 0x1374D6C: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:577)
==22810==    by 0x1374D6C: execute_ex (zend_vm_execute.h:59775)
==22810==    by 0x139C8EE: zend_execute (zend_vm_execute.h:63804)
==22810== 

 

Generated at Fri, 16 Oct 2020 02:28:14 +0000 (5 days ago)

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