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

==11846== Invalid read of size 8
==11846==    at 0xEB914A: _php_stream_free (streams.c:370)
==11846==    by 0x6CA9D1: ftp_close (ftp.c:175)
==11846==    by 0x6C4BA8: ftp_destructor_ftpbuf (php_ftp.c:315)
==11846==    by 0xFD80D4: zend_resource_dtor (zend_list.c:74)
==11846==    by 0xFD8B82: zend_close_rsrc_list (zend_list.c:230)
==11846==    by 0xF64D8A: shutdown_executor (zend_execute_API.c:263)
==11846==    by 0xF9847F: zend_deactivate (zend.c:1179)
==11846==    by 0xE85C03: php_request_shutdown (main.c:1906)
==11846==    by 0x1219D23: do_cli (php_cli.c:1159)
==11846==    by 0x121A658: main (php_cli.c:1384)
==11846==  Address 0x16df9a40 is 144 bytes inside a block of size 224 free'd
==11846==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==11846==    by 0xF2A91D: _efree (zend_alloc.c:2544)
==11846==    by 0xEB998A: _php_stream_free (streams.c:508)
==11846==    by 0xEBDF52: stream_resource_regular_dtor (streams.c:1590)
==11846==    by 0xFD80D4: zend_resource_dtor (zend_list.c:74)
==11846==    by 0xFD8B82: zend_close_rsrc_list (zend_list.c:230)
==11846==    by 0xF64D8A: shutdown_executor (zend_execute_API.c:263)
==11846==    by 0xF9847F: zend_deactivate (zend.c:1179)
==11846==    by 0xE85C03: php_request_shutdown (main.c:1906)
==11846==    by 0x1219D23: do_cli (php_cli.c:1159)
==11846==    by 0x121A658: main (php_cli.c:1384)
==11846==  Block was alloc'd at
==11846==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==11846==    by 0xF2E5A5: __zend_malloc (zend_alloc.c:2937)
==11846==    by 0xF2674B: _emalloc_224 (zend_alloc.c:2457)
==11846==    by 0xEB8E11: _php_stream_alloc (streams.c:276)
==11846==    by 0xEC77D4: _php_stream_fopen_from_fd_int (plain_wrapper.c:184)
==11846==    by 0xEC7B12: _php_stream_fopen_from_fd (plain_wrapper.c:246)
==11846==    by 0xEC9D27: _php_stream_fopen (plain_wrapper.c:1054)
==11846==    by 0xECA32D: php_plain_files_stream_opener (plain_wrapper.c:1110)
==11846==    by 0xEC032E: _php_stream_open_wrapper_ex (streams.c:2030)
==11846==    by 0x6C7DBD: zif_ftp_nb_get (php_ftp.c:1040)
==11846==    by 0x11E87A1: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:930)
==11846==    by 0x11E87A1: execute_ex (zend_vm_execute.h:59868)
==11846==    by 0x1212C87: zend_execute (zend_vm_execute.h:66092)
==11846== 
==11846== Invalid read of size 4
==11846==    at 0xEB9198: _php_stream_free (streams.c:373)
==11846==    by 0x6CA9D1: ftp_close (ftp.c:175)
==11846==    by 0x6C4BA8: ftp_destructor_ftpbuf (php_ftp.c:315)
==11846==    by 0xFD80D4: zend_resource_dtor (zend_list.c:74)
==11846==    by 0xFD8B82: zend_close_rsrc_list (zend_list.c:230)
==11846==    by 0xF64D8A: shutdown_executor (zend_execute_API.c:263)
==11846==    by 0xF9847F: zend_deactivate (zend.c:1179)
==11846==    by 0xE85C03: php_request_shutdown (main.c:1906)
==11846==    by 0x1219D23: do_cli (php_cli.c:1159)
==11846==    by 0x121A658: main (php_cli.c:1384)
==11846==  Address 0x16df9a24 is 116 bytes inside a block of size 224 free'd
==11846==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==11846==    by 0xF2A91D: _efree (zend_alloc.c:2544)
==11846==    by 0xEB998A: _php_stream_free (streams.c:508)
==11846==    by 0xEBDF52: stream_resource_regular_dtor (streams.c:1590)
==11846==    by 0xFD80D4: zend_resource_dtor (zend_list.c:74)
==11846==    by 0xFD8B82: zend_close_rsrc_list (zend_list.c:230)
==11846==    by 0xF64D8A: shutdown_executor (zend_execute_API.c:263)
==11846==    by 0xF9847F: zend_deactivate (zend.c:1179)
==11846==    by 0xE85C03: php_request_shutdown (main.c:1906)
==11846==    by 0x1219D23: do_cli (php_cli.c:1159)
==11846==    by 0x121A658: main (php_cli.c:1384)
==11846==  Block was alloc'd at
==11846==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==11846==    by 0xF2E5A5: __zend_malloc (zend_alloc.c:2937)
==11846==    by 0xF2674B: _emalloc_224 (zend_alloc.c:2457)
==11846==    by 0xEB8E11: _php_stream_alloc (streams.c:276)
==11846==    by 0xEC77D4: _php_stream_fopen_from_fd_int (plain_wrapper.c:184)
==11846==    by 0xEC7B12: _php_stream_fopen_from_fd (plain_wrapper.c:246)
==11846==    by 0xEC9D27: _php_stream_fopen (plain_wrapper.c:1054)
==11846==    by 0xECA32D: php_plain_files_stream_opener (plain_wrapper.c:1110)
==11846==    by 0xEC032E: _php_stream_open_wrapper_ex (streams.c:2030)
==11846==    by 0x6C7DBD: zif_ftp_nb_get (php_ftp.c:1040)
==11846==    by 0x11E87A1: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:930)
==11846==    by 0x11E87A1: execute_ex (zend_vm_execute.h:59868)
==11846==    by 0x1212C87: zend_execute (zend_vm_execute.h:66092)
==11846== 
==11846== Invalid read of size 1
==11846==    at 0xEB91BF: _php_stream_free (streams.c:386)
==11846==    by 0x6CA9D1: ftp_close (ftp.c:175)
==11846==    by 0x6C4BA8: ftp_destructor_ftpbuf (php_ftp.c:315)
==11846==    by 0xFD80D4: zend_resource_dtor (zend_list.c:74)
==11846==    by 0xFD8B82: zend_close_rsrc_list (zend_list.c:230)
==11846==    by 0xF64D8A: shutdown_executor (zend_execute_API.c:263)
==11846==    by 0xF9847F: zend_deactivate (zend.c:1179)
==11846==    by 0xE85C03: php_request_shutdown (main.c:1906)
==11846==    by 0x1219D23: do_cli (php_cli.c:1159)
==11846==    by 0x121A658: main (php_cli.c:1384)
==11846==  Address 0x16df9a10 is 96 bytes inside a block of size 224 free'd
==11846==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==11846==    by 0xF2A91D: _efree (zend_alloc.c:2544)
==11846==    by 0xEB998A: _php_stream_free (streams.c:508)
==11846==    by 0xEBDF52: stream_resource_regular_dtor (streams.c:1590)
==11846==    by 0xFD80D4: zend_resource_dtor (zend_list.c:74)
==11846==    by 0xFD8B82: zend_close_rsrc_list (zend_list.c:230)
==11846==    by 0xF64D8A: shutdown_executor (zend_execute_API.c:263)
==11846==    by 0xF9847F: zend_deactivate (zend.c:1179)
==11846==    by 0xE85C03: php_request_shutdown (main.c:1906)
==11846==    by 0x1219D23: do_cli (php_cli.c:1159)
==11846==    by 0x121A658: main (php_cli.c:1384)
==11846==  Block was alloc'd at
==11846==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==11846==    by 0xF2E5A5: __zend_malloc (zend_alloc.c:2937)
==11846==    by 0xF2674B: _emalloc_224 (zend_alloc.c:2457)
==11846==    by 0xEB8E11: _php_stream_alloc (streams.c:276)
==11846==    by 0xEC77D4: _php_stream_fopen_from_fd_int (plain_wrapper.c:184)
==11846==    by 0xEC7B12: _php_stream_fopen_from_fd (plain_wrapper.c:246)
==11846==    by 0xEC9D27: _php_stream_fopen (plain_wrapper.c:1054)
==11846==    by 0xECA32D: php_plain_files_stream_opener (plain_wrapper.c:1110)
==11846==    by 0xEC032E: _php_stream_open_wrapper_ex (streams.c:2030)
==11846==    by 0x6C7DBD: zif_ftp_nb_get (php_ftp.c:1040)
==11846==    by 0x11E87A1: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:930)
==11846==    by 0x11E87A1: execute_ex (zend_vm_execute.h:59868)
==11846==    by 0x1212C87: zend_execute (zend_vm_execute.h:66092)
==11846== 
==11846== Invalid read of size 1
==11846==    at 0xEB91D2: _php_stream_free (streams.c:388)
==11846==    by 0x6CA9D1: ftp_close (ftp.c:175)
==11846==    by 0x6C4BA8: ftp_destructor_ftpbuf (php_ftp.c:315)
==11846==    by 0xFD80D4: zend_resource_dtor (zend_list.c:74)
==11846==    by 0xFD8B82: zend_close_rsrc_list (zend_list.c:230)
==11846==    by 0xF64D8A: shutdown_executor (zend_execute_API.c:263)
==11846==    by 0xF9847F: zend_deactivate (zend.c:1179)
==11846==    by 0xE85C03: php_request_shutdown (main.c:1906)
==11846==    by 0x1219D23: do_cli (php_cli.c:1159)
==11846==    by 0x121A658: main (php_cli.c:1384)
==11846==  Address 0x16df9a10 is 96 bytes inside a block of size 224 free'd
==11846==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==11846==    by 0xF2A91D: _efree (zend_alloc.c:2544)
==11846==    by 0xEB998A: _php_stream_free (streams.c:508)
==11846==    by 0xEBDF52: stream_resource_regular_dtor (streams.c:1590)
==11846==    by 0xFD80D4: zend_resource_dtor (zend_list.c:74)
==11846==    by 0xFD8B82: zend_close_rsrc_list (zend_list.c:230)
==11846==    by 0xF64D8A: shutdown_executor (zend_execute_API.c:263)
==11846==    by 0xF9847F: zend_deactivate (zend.c:1179)
==11846==    by 0xE85C03: php_request_shutdown (main.c:1906)
==11846==    by 0x1219D23: do_cli (php_cli.c:1159)
==11846==    by 0x121A658: main (php_cli.c:1384)
==11846==  Block was alloc'd at
==11846==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==11846==    by 0xF2E5A5: __zend_malloc (zend_alloc.c:2937)
==11846==    by 0xF2674B: _emalloc_224 (zend_alloc.c:2457)
==11846==    by 0xEB8E11: _php_stream_alloc (streams.c:276)
==11846==    by 0xEC77D4: _php_stream_fopen_from_fd_int (plain_wrapper.c:184)
==11846==    by 0xEC7B12: _php_stream_fopen_from_fd (plain_wrapper.c:246)
==11846==    by 0xEC9D27: _php_stream_fopen (plain_wrapper.c:1054)
==11846==    by 0xECA32D: php_plain_files_stream_opener (plain_wrapper.c:1110)
==11846==    by 0xEC032E: _php_stream_open_wrapper_ex (streams.c:2030)
==11846==    by 0x6C7DBD: zif_ftp_nb_get (php_ftp.c:1040)
==11846==    by 0x11E87A1: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:930)
==11846==    by 0x11E87A1: execute_ex (zend_vm_execute.h:59868)
==11846==    by 0x1212C87: zend_execute (zend_vm_execute.h:66092)
==11846== 

 

Generated at Tue, 05 Mar 2019 22:11:22 +0000 (12 days ago)

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