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

==11622== Invalid read of size 8
==11622==    at 0xFFF6DD: _php_stream_free (streams.c:372)
==11622==    by 0x81011F: ftp_close (ftp.c:171)
==11622==    by 0x80A3F9: ftp_destructor_ftpbuf (php_ftp.c:317)
==11622==    by 0x1120A31: zend_resource_dtor (zend_list.c:76)
==11622==    by 0x1121437: zend_close_rsrc (zend_list.c:230)
==11622==    by 0x1116BF4: zend_hash_reverse_apply (zend_hash.c:1597)
==11622==    by 0x1121481: zend_close_rsrc_list (zend_list.c:238)
==11622==    by 0x10AA8BC: shutdown_executor (zend_execute_API.c:262)
==11622==    by 0x10DCF4E: zend_deactivate (zend.c:1034)
==11622==    by 0xFCE9DF: php_request_shutdown (main.c:1880)
==11622==    by 0x1340B62: do_cli (php_cli.c:1178)
==11622==    by 0x134142D: main (php_cli.c:1404)
==11622==  Address 0x1503b890 is 144 bytes inside a block of size 224 free'd
==11622==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==11622==    by 0x1076214: _efree (zend_alloc.c:2428)
==11622==    by 0xFFFF1D: _php_stream_free (streams.c:510)
==11622==    by 0x1004472: stream_resource_regular_dtor (streams.c:1588)
==11622==    by 0x1120A31: zend_resource_dtor (zend_list.c:76)
==11622==    by 0x1121437: zend_close_rsrc (zend_list.c:230)
==11622==    by 0x1116BF4: zend_hash_reverse_apply (zend_hash.c:1597)
==11622==    by 0x1121481: zend_close_rsrc_list (zend_list.c:238)
==11622==    by 0x10AA8BC: shutdown_executor (zend_execute_API.c:262)
==11622==    by 0x10DCF4E: zend_deactivate (zend.c:1034)
==11622==    by 0xFCE9DF: php_request_shutdown (main.c:1880)
==11622==    by 0x1340B62: do_cli (php_cli.c:1178)
==11622==  Block was alloc'd at
==11622==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==11622==    by 0x10777DB: __zend_malloc (zend_alloc.c:2811)
==11622==    by 0x1071F6D: _emalloc_224 (zend_alloc.c:2336)
==11622==    by 0xFFF33E: _php_stream_alloc (streams.c:273)
==11622==    by 0x100D6D4: _php_stream_fopen_from_fd_int (plain_wrapper.c:186)
==11622==    by 0x100DA02: _php_stream_fopen_from_fd (plain_wrapper.c:248)
==11622==    by 0x100FC2E: _php_stream_fopen (plain_wrapper.c:1024)
==11622==    by 0x101011D: php_plain_files_stream_opener (plain_wrapper.c:1080)
==11622==    by 0x10067B5: _php_stream_open_wrapper_ex (streams.c:2024)
==11622==    by 0x80D4F6: zif_ftp_nb_get (php_ftp.c:1042)
==11622==    by 0x11BD4EB: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:573)
==11622==    by 0x1339863: execute_ex (zend_vm_execute.h:59726)
==11622== 
==11622== Invalid read of size 4
==11622==    at 0xFFF72B: _php_stream_free (streams.c:375)
==11622==    by 0x81011F: ftp_close (ftp.c:171)
==11622==    by 0x80A3F9: ftp_destructor_ftpbuf (php_ftp.c:317)
==11622==    by 0x1120A31: zend_resource_dtor (zend_list.c:76)
==11622==    by 0x1121437: zend_close_rsrc (zend_list.c:230)
==11622==    by 0x1116BF4: zend_hash_reverse_apply (zend_hash.c:1597)
==11622==    by 0x1121481: zend_close_rsrc_list (zend_list.c:238)
==11622==    by 0x10AA8BC: shutdown_executor (zend_execute_API.c:262)
==11622==    by 0x10DCF4E: zend_deactivate (zend.c:1034)
==11622==    by 0xFCE9DF: php_request_shutdown (main.c:1880)
==11622==    by 0x1340B62: do_cli (php_cli.c:1178)
==11622==    by 0x134142D: main (php_cli.c:1404)
==11622==  Address 0x1503b874 is 116 bytes inside a block of size 224 free'd
==11622==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==11622==    by 0x1076214: _efree (zend_alloc.c:2428)
==11622==    by 0xFFFF1D: _php_stream_free (streams.c:510)
==11622==    by 0x1004472: stream_resource_regular_dtor (streams.c:1588)
==11622==    by 0x1120A31: zend_resource_dtor (zend_list.c:76)
==11622==    by 0x1121437: zend_close_rsrc (zend_list.c:230)
==11622==    by 0x1116BF4: zend_hash_reverse_apply (zend_hash.c:1597)
==11622==    by 0x1121481: zend_close_rsrc_list (zend_list.c:238)
==11622==    by 0x10AA8BC: shutdown_executor (zend_execute_API.c:262)
==11622==    by 0x10DCF4E: zend_deactivate (zend.c:1034)
==11622==    by 0xFCE9DF: php_request_shutdown (main.c:1880)
==11622==    by 0x1340B62: do_cli (php_cli.c:1178)
==11622==  Block was alloc'd at
==11622==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==11622==    by 0x10777DB: __zend_malloc (zend_alloc.c:2811)
==11622==    by 0x1071F6D: _emalloc_224 (zend_alloc.c:2336)
==11622==    by 0xFFF33E: _php_stream_alloc (streams.c:273)
==11622==    by 0x100D6D4: _php_stream_fopen_from_fd_int (plain_wrapper.c:186)
==11622==    by 0x100DA02: _php_stream_fopen_from_fd (plain_wrapper.c:248)
==11622==    by 0x100FC2E: _php_stream_fopen (plain_wrapper.c:1024)
==11622==    by 0x101011D: php_plain_files_stream_opener (plain_wrapper.c:1080)
==11622==    by 0x10067B5: _php_stream_open_wrapper_ex (streams.c:2024)
==11622==    by 0x80D4F6: zif_ftp_nb_get (php_ftp.c:1042)
==11622==    by 0x11BD4EB: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:573)
==11622==    by 0x1339863: execute_ex (zend_vm_execute.h:59726)
==11622== 
==11622== Invalid read of size 1
==11622==    at 0xFFF752: _php_stream_free (streams.c:388)
==11622==    by 0x81011F: ftp_close (ftp.c:171)
==11622==    by 0x80A3F9: ftp_destructor_ftpbuf (php_ftp.c:317)
==11622==    by 0x1120A31: zend_resource_dtor (zend_list.c:76)
==11622==    by 0x1121437: zend_close_rsrc (zend_list.c:230)
==11622==    by 0x1116BF4: zend_hash_reverse_apply (zend_hash.c:1597)
==11622==    by 0x1121481: zend_close_rsrc_list (zend_list.c:238)
==11622==    by 0x10AA8BC: shutdown_executor (zend_execute_API.c:262)
==11622==    by 0x10DCF4E: zend_deactivate (zend.c:1034)
==11622==    by 0xFCE9DF: php_request_shutdown (main.c:1880)
==11622==    by 0x1340B62: do_cli (php_cli.c:1178)
==11622==    by 0x134142D: main (php_cli.c:1404)
==11622==  Address 0x1503b860 is 96 bytes inside a block of size 224 free'd
==11622==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==11622==    by 0x1076214: _efree (zend_alloc.c:2428)
==11622==    by 0xFFFF1D: _php_stream_free (streams.c:510)
==11622==    by 0x1004472: stream_resource_regular_dtor (streams.c:1588)
==11622==    by 0x1120A31: zend_resource_dtor (zend_list.c:76)
==11622==    by 0x1121437: zend_close_rsrc (zend_list.c:230)
==11622==    by 0x1116BF4: zend_hash_reverse_apply (zend_hash.c:1597)
==11622==    by 0x1121481: zend_close_rsrc_list (zend_list.c:238)
==11622==    by 0x10AA8BC: shutdown_executor (zend_execute_API.c:262)
==11622==    by 0x10DCF4E: zend_deactivate (zend.c:1034)
==11622==    by 0xFCE9DF: php_request_shutdown (main.c:1880)
==11622==    by 0x1340B62: do_cli (php_cli.c:1178)
==11622==  Block was alloc'd at
==11622==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==11622==    by 0x10777DB: __zend_malloc (zend_alloc.c:2811)
==11622==    by 0x1071F6D: _emalloc_224 (zend_alloc.c:2336)
==11622==    by 0xFFF33E: _php_stream_alloc (streams.c:273)
==11622==    by 0x100D6D4: _php_stream_fopen_from_fd_int (plain_wrapper.c:186)
==11622==    by 0x100DA02: _php_stream_fopen_from_fd (plain_wrapper.c:248)
==11622==    by 0x100FC2E: _php_stream_fopen (plain_wrapper.c:1024)
==11622==    by 0x101011D: php_plain_files_stream_opener (plain_wrapper.c:1080)
==11622==    by 0x10067B5: _php_stream_open_wrapper_ex (streams.c:2024)
==11622==    by 0x80D4F6: zif_ftp_nb_get (php_ftp.c:1042)
==11622==    by 0x11BD4EB: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:573)
==11622==    by 0x1339863: execute_ex (zend_vm_execute.h:59726)
==11622== 
==11622== Invalid read of size 1
==11622==    at 0xFFF765: _php_stream_free (streams.c:390)
==11622==    by 0x81011F: ftp_close (ftp.c:171)
==11622==    by 0x80A3F9: ftp_destructor_ftpbuf (php_ftp.c:317)
==11622==    by 0x1120A31: zend_resource_dtor (zend_list.c:76)
==11622==    by 0x1121437: zend_close_rsrc (zend_list.c:230)
==11622==    by 0x1116BF4: zend_hash_reverse_apply (zend_hash.c:1597)
==11622==    by 0x1121481: zend_close_rsrc_list (zend_list.c:238)
==11622==    by 0x10AA8BC: shutdown_executor (zend_execute_API.c:262)
==11622==    by 0x10DCF4E: zend_deactivate (zend.c:1034)
==11622==    by 0xFCE9DF: php_request_shutdown (main.c:1880)
==11622==    by 0x1340B62: do_cli (php_cli.c:1178)
==11622==    by 0x134142D: main (php_cli.c:1404)
==11622==  Address 0x1503b860 is 96 bytes inside a block of size 224 free'd
==11622==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==11622==    by 0x1076214: _efree (zend_alloc.c:2428)
==11622==    by 0xFFFF1D: _php_stream_free (streams.c:510)
==11622==    by 0x1004472: stream_resource_regular_dtor (streams.c:1588)
==11622==    by 0x1120A31: zend_resource_dtor (zend_list.c:76)
==11622==    by 0x1121437: zend_close_rsrc (zend_list.c:230)
==11622==    by 0x1116BF4: zend_hash_reverse_apply (zend_hash.c:1597)
==11622==    by 0x1121481: zend_close_rsrc_list (zend_list.c:238)
==11622==    by 0x10AA8BC: shutdown_executor (zend_execute_API.c:262)
==11622==    by 0x10DCF4E: zend_deactivate (zend.c:1034)
==11622==    by 0xFCE9DF: php_request_shutdown (main.c:1880)
==11622==    by 0x1340B62: do_cli (php_cli.c:1178)
==11622==  Block was alloc'd at
==11622==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==11622==    by 0x10777DB: __zend_malloc (zend_alloc.c:2811)
==11622==    by 0x1071F6D: _emalloc_224 (zend_alloc.c:2336)
==11622==    by 0xFFF33E: _php_stream_alloc (streams.c:273)
==11622==    by 0x100D6D4: _php_stream_fopen_from_fd_int (plain_wrapper.c:186)
==11622==    by 0x100DA02: _php_stream_fopen_from_fd (plain_wrapper.c:248)
==11622==    by 0x100FC2E: _php_stream_fopen (plain_wrapper.c:1024)
==11622==    by 0x101011D: php_plain_files_stream_opener (plain_wrapper.c:1080)
==11622==    by 0x10067B5: _php_stream_open_wrapper_ex (streams.c:2024)
==11622==    by 0x80D4F6: zif_ftp_nb_get (php_ftp.c:1042)
==11622==    by 0x11BD4EB: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:573)
==11622==    by 0x1339863: execute_ex (zend_vm_execute.h:59726)
==11622== 

 

Generated at Sat, 09 Sep 2017 03:10:54 +0000 (14 days ago)

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