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

==28438== Invalid read of size 8
==28438==    at 0x1023F93: _php_stream_free (streams.c:373)
==28438==    by 0x80BA7E: ftp_close (ftp.c:177)
==28438==    by 0x805D62: ftp_destructor_ftpbuf (php_ftp.c:317)
==28438==    by 0x114799E: zend_resource_dtor (zend_list.c:76)
==28438==    by 0x11483C3: zend_close_rsrc (zend_list.c:230)
==28438==    by 0x113D40B: zend_hash_reverse_apply (zend_hash.c:1599)
==28438==    by 0x114840F: zend_close_rsrc_list (zend_list.c:238)
==28438==    by 0x10CFBF3: shutdown_executor (zend_execute_API.c:263)
==28438==    by 0x110392B: zend_deactivate (zend.c:1032)
==28438==    by 0xFF3E2B: php_request_shutdown (main.c:1904)
==28438==    by 0x13886B0: do_cli (php_cli.c:1178)
==28438==    by 0x1388FE5: main (php_cli.c:1403)
==28438==  Address 0x1658b4a0 is 144 bytes inside a block of size 224 free'd
==28438==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==28438==    by 0x1098A9C: _efree (zend_alloc.c:2444)
==28438==    by 0x10247D3: _php_stream_free (streams.c:511)
==28438==    by 0x1028BE3: stream_resource_regular_dtor (streams.c:1591)
==28438==    by 0x114799E: zend_resource_dtor (zend_list.c:76)
==28438==    by 0x11483C3: zend_close_rsrc (zend_list.c:230)
==28438==    by 0x113D40B: zend_hash_reverse_apply (zend_hash.c:1599)
==28438==    by 0x114840F: zend_close_rsrc_list (zend_list.c:238)
==28438==    by 0x10CFBF3: shutdown_executor (zend_execute_API.c:263)
==28438==    by 0x110392B: zend_deactivate (zend.c:1032)
==28438==    by 0xFF3E2B: php_request_shutdown (main.c:1904)
==28438==    by 0x13886B0: do_cli (php_cli.c:1178)
==28438==  Block was alloc'd at
==28438==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==28438==    by 0x109A002: __zend_malloc (zend_alloc.c:2829)
==28438==    by 0x10947C4: _emalloc_224 (zend_alloc.c:2352)
==28438==    by 0x1023BED: _php_stream_alloc (streams.c:274)
==28438==    by 0x1031D93: _php_stream_fopen_from_fd_int (plain_wrapper.c:186)
==28438==    by 0x10320D1: _php_stream_fopen_from_fd (plain_wrapper.c:248)
==28438==    by 0x1034256: _php_stream_fopen (plain_wrapper.c:1024)
==28438==    by 0x1034791: php_plain_files_stream_opener (plain_wrapper.c:1080)
==28438==    by 0x102AF2D: _php_stream_open_wrapper_ex (streams.c:2027)
==28438==    by 0x808E92: zif_ftp_nb_get (php_ftp.c:1042)
==28438==    by 0x1359BF6: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:573)
==28438==    by 0x1359BF6: execute_ex (zend_vm_execute.h:59747)
==28438==    by 0x13816A0: zend_execute (zend_vm_execute.h:63776)
==28438== 
==28438== Invalid read of size 4
==28438==    at 0x1023FE1: _php_stream_free (streams.c:376)
==28438==    by 0x80BA7E: ftp_close (ftp.c:177)
==28438==    by 0x805D62: ftp_destructor_ftpbuf (php_ftp.c:317)
==28438==    by 0x114799E: zend_resource_dtor (zend_list.c:76)
==28438==    by 0x11483C3: zend_close_rsrc (zend_list.c:230)
==28438==    by 0x113D40B: zend_hash_reverse_apply (zend_hash.c:1599)
==28438==    by 0x114840F: zend_close_rsrc_list (zend_list.c:238)
==28438==    by 0x10CFBF3: shutdown_executor (zend_execute_API.c:263)
==28438==    by 0x110392B: zend_deactivate (zend.c:1032)
==28438==    by 0xFF3E2B: php_request_shutdown (main.c:1904)
==28438==    by 0x13886B0: do_cli (php_cli.c:1178)
==28438==    by 0x1388FE5: main (php_cli.c:1403)
==28438==  Address 0x1658b484 is 116 bytes inside a block of size 224 free'd
==28438==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==28438==    by 0x1098A9C: _efree (zend_alloc.c:2444)
==28438==    by 0x10247D3: _php_stream_free (streams.c:511)
==28438==    by 0x1028BE3: stream_resource_regular_dtor (streams.c:1591)
==28438==    by 0x114799E: zend_resource_dtor (zend_list.c:76)
==28438==    by 0x11483C3: zend_close_rsrc (zend_list.c:230)
==28438==    by 0x113D40B: zend_hash_reverse_apply (zend_hash.c:1599)
==28438==    by 0x114840F: zend_close_rsrc_list (zend_list.c:238)
==28438==    by 0x10CFBF3: shutdown_executor (zend_execute_API.c:263)
==28438==    by 0x110392B: zend_deactivate (zend.c:1032)
==28438==    by 0xFF3E2B: php_request_shutdown (main.c:1904)
==28438==    by 0x13886B0: do_cli (php_cli.c:1178)
==28438==  Block was alloc'd at
==28438==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==28438==    by 0x109A002: __zend_malloc (zend_alloc.c:2829)
==28438==    by 0x10947C4: _emalloc_224 (zend_alloc.c:2352)
==28438==    by 0x1023BED: _php_stream_alloc (streams.c:274)
==28438==    by 0x1031D93: _php_stream_fopen_from_fd_int (plain_wrapper.c:186)
==28438==    by 0x10320D1: _php_stream_fopen_from_fd (plain_wrapper.c:248)
==28438==    by 0x1034256: _php_stream_fopen (plain_wrapper.c:1024)
==28438==    by 0x1034791: php_plain_files_stream_opener (plain_wrapper.c:1080)
==28438==    by 0x102AF2D: _php_stream_open_wrapper_ex (streams.c:2027)
==28438==    by 0x808E92: zif_ftp_nb_get (php_ftp.c:1042)
==28438==    by 0x1359BF6: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:573)
==28438==    by 0x1359BF6: execute_ex (zend_vm_execute.h:59747)
==28438==    by 0x13816A0: zend_execute (zend_vm_execute.h:63776)
==28438== 
==28438== Invalid read of size 1
==28438==    at 0x1024008: _php_stream_free (streams.c:389)
==28438==    by 0x80BA7E: ftp_close (ftp.c:177)
==28438==    by 0x805D62: ftp_destructor_ftpbuf (php_ftp.c:317)
==28438==    by 0x114799E: zend_resource_dtor (zend_list.c:76)
==28438==    by 0x11483C3: zend_close_rsrc (zend_list.c:230)
==28438==    by 0x113D40B: zend_hash_reverse_apply (zend_hash.c:1599)
==28438==    by 0x114840F: zend_close_rsrc_list (zend_list.c:238)
==28438==    by 0x10CFBF3: shutdown_executor (zend_execute_API.c:263)
==28438==    by 0x110392B: zend_deactivate (zend.c:1032)
==28438==    by 0xFF3E2B: php_request_shutdown (main.c:1904)
==28438==    by 0x13886B0: do_cli (php_cli.c:1178)
==28438==    by 0x1388FE5: main (php_cli.c:1403)
==28438==  Address 0x1658b470 is 96 bytes inside a block of size 224 free'd
==28438==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==28438==    by 0x1098A9C: _efree (zend_alloc.c:2444)
==28438==    by 0x10247D3: _php_stream_free (streams.c:511)
==28438==    by 0x1028BE3: stream_resource_regular_dtor (streams.c:1591)
==28438==    by 0x114799E: zend_resource_dtor (zend_list.c:76)
==28438==    by 0x11483C3: zend_close_rsrc (zend_list.c:230)
==28438==    by 0x113D40B: zend_hash_reverse_apply (zend_hash.c:1599)
==28438==    by 0x114840F: zend_close_rsrc_list (zend_list.c:238)
==28438==    by 0x10CFBF3: shutdown_executor (zend_execute_API.c:263)
==28438==    by 0x110392B: zend_deactivate (zend.c:1032)
==28438==    by 0xFF3E2B: php_request_shutdown (main.c:1904)
==28438==    by 0x13886B0: do_cli (php_cli.c:1178)
==28438==  Block was alloc'd at
==28438==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==28438==    by 0x109A002: __zend_malloc (zend_alloc.c:2829)
==28438==    by 0x10947C4: _emalloc_224 (zend_alloc.c:2352)
==28438==    by 0x1023BED: _php_stream_alloc (streams.c:274)
==28438==    by 0x1031D93: _php_stream_fopen_from_fd_int (plain_wrapper.c:186)
==28438==    by 0x10320D1: _php_stream_fopen_from_fd (plain_wrapper.c:248)
==28438==    by 0x1034256: _php_stream_fopen (plain_wrapper.c:1024)
==28438==    by 0x1034791: php_plain_files_stream_opener (plain_wrapper.c:1080)
==28438==    by 0x102AF2D: _php_stream_open_wrapper_ex (streams.c:2027)
==28438==    by 0x808E92: zif_ftp_nb_get (php_ftp.c:1042)
==28438==    by 0x1359BF6: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:573)
==28438==    by 0x1359BF6: execute_ex (zend_vm_execute.h:59747)
==28438==    by 0x13816A0: zend_execute (zend_vm_execute.h:63776)
==28438== 
==28438== Invalid read of size 1
==28438==    at 0x102401B: _php_stream_free (streams.c:391)
==28438==    by 0x80BA7E: ftp_close (ftp.c:177)
==28438==    by 0x805D62: ftp_destructor_ftpbuf (php_ftp.c:317)
==28438==    by 0x114799E: zend_resource_dtor (zend_list.c:76)
==28438==    by 0x11483C3: zend_close_rsrc (zend_list.c:230)
==28438==    by 0x113D40B: zend_hash_reverse_apply (zend_hash.c:1599)
==28438==    by 0x114840F: zend_close_rsrc_list (zend_list.c:238)
==28438==    by 0x10CFBF3: shutdown_executor (zend_execute_API.c:263)
==28438==    by 0x110392B: zend_deactivate (zend.c:1032)
==28438==    by 0xFF3E2B: php_request_shutdown (main.c:1904)
==28438==    by 0x13886B0: do_cli (php_cli.c:1178)
==28438==    by 0x1388FE5: main (php_cli.c:1403)
==28438==  Address 0x1658b470 is 96 bytes inside a block of size 224 free'd
==28438==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==28438==    by 0x1098A9C: _efree (zend_alloc.c:2444)
==28438==    by 0x10247D3: _php_stream_free (streams.c:511)
==28438==    by 0x1028BE3: stream_resource_regular_dtor (streams.c:1591)
==28438==    by 0x114799E: zend_resource_dtor (zend_list.c:76)
==28438==    by 0x11483C3: zend_close_rsrc (zend_list.c:230)
==28438==    by 0x113D40B: zend_hash_reverse_apply (zend_hash.c:1599)
==28438==    by 0x114840F: zend_close_rsrc_list (zend_list.c:238)
==28438==    by 0x10CFBF3: shutdown_executor (zend_execute_API.c:263)
==28438==    by 0x110392B: zend_deactivate (zend.c:1032)
==28438==    by 0xFF3E2B: php_request_shutdown (main.c:1904)
==28438==    by 0x13886B0: do_cli (php_cli.c:1178)
==28438==  Block was alloc'd at
==28438==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==28438==    by 0x109A002: __zend_malloc (zend_alloc.c:2829)
==28438==    by 0x10947C4: _emalloc_224 (zend_alloc.c:2352)
==28438==    by 0x1023BED: _php_stream_alloc (streams.c:274)
==28438==    by 0x1031D93: _php_stream_fopen_from_fd_int (plain_wrapper.c:186)
==28438==    by 0x10320D1: _php_stream_fopen_from_fd (plain_wrapper.c:248)
==28438==    by 0x1034256: _php_stream_fopen (plain_wrapper.c:1024)
==28438==    by 0x1034791: php_plain_files_stream_opener (plain_wrapper.c:1080)
==28438==    by 0x102AF2D: _php_stream_open_wrapper_ex (streams.c:2027)
==28438==    by 0x808E92: zif_ftp_nb_get (php_ftp.c:1042)
==28438==    by 0x1359BF6: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:573)
==28438==    by 0x1359BF6: execute_ex (zend_vm_execute.h:59747)
==28438==    by 0x13816A0: zend_execute (zend_vm_execute.h:63776)
==28438== 

 

Generated at Sun, 10 Feb 2019 05:24:25 +0000 (7 days ago)

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