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 __DIR__ 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

==10519== Invalid read of size 8
==10519==    at 0xE4626E: _php_stream_free (streams.c:370)
==10519==    by 0x6C1619: ftp_close (ftp.c:175)
==10519==    by 0x6BB800: ftp_destructor_ftpbuf (php_ftp.c:315)
==10519==    by 0xF63E8F: zend_resource_dtor (zend_list.c:74)
==10519==    by 0xF6493D: zend_close_rsrc_list (zend_list.c:230)
==10519==    by 0xEF1CF3: shutdown_executor (zend_execute_API.c:266)
==10519==    by 0xF252DE: zend_deactivate (zend.c:1178)
==10519==    by 0xE12F4B: php_request_shutdown (main.c:1945)
==10519==    by 0x119ECDC: do_cli (php_cli.c:1152)
==10519==    by 0x119F611: main (php_cli.c:1375)
==10519==  Address 0x1617c7a0 is 144 bytes inside a block of size 224 free'd
==10519==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==10519==    by 0xEB773F: _efree (zend_alloc.c:2541)
==10519==    by 0xE46AAE: _php_stream_free (streams.c:508)
==10519==    by 0xE4B03E: stream_resource_regular_dtor (streams.c:1590)
==10519==    by 0xF63E8F: zend_resource_dtor (zend_list.c:74)
==10519==    by 0xF6493D: zend_close_rsrc_list (zend_list.c:230)
==10519==    by 0xEF1CF3: shutdown_executor (zend_execute_API.c:266)
==10519==    by 0xF252DE: zend_deactivate (zend.c:1178)
==10519==    by 0xE12F4B: php_request_shutdown (main.c:1945)
==10519==    by 0x119ECDC: do_cli (php_cli.c:1152)
==10519==    by 0x119F611: main (php_cli.c:1375)
==10519==  Block was alloc'd at
==10519==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==10519==    by 0xEBB3C1: __zend_malloc (zend_alloc.c:2933)
==10519==    by 0xEB356D: _emalloc_224 (zend_alloc.c:2454)
==10519==    by 0xE45F35: _php_stream_alloc (streams.c:276)
==10519==    by 0xE548B8: _php_stream_fopen_from_fd_int (plain_wrapper.c:184)
==10519==    by 0xE54BF6: _php_stream_fopen_from_fd (plain_wrapper.c:246)
==10519==    by 0xE56DAB: _php_stream_fopen (plain_wrapper.c:1053)
==10519==    by 0xE5739D: php_plain_files_stream_opener (plain_wrapper.c:1109)
==10519==    by 0xE4D41A: _php_stream_open_wrapper_ex (streams.c:2030)
==10519==    by 0x6BEA05: zif_ftp_nb_get (php_ftp.c:1040)
==10519==    by 0x116E2D2: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:912)
==10519==    by 0x116E2D2: execute_ex (zend_vm_execute.h:60369)
==10519==    by 0x1197C83: zend_execute (zend_vm_execute.h:66602)
==10519== 
==10519== Invalid read of size 4
==10519==    at 0xE462BC: _php_stream_free (streams.c:373)
==10519==    by 0x6C1619: ftp_close (ftp.c:175)
==10519==    by 0x6BB800: ftp_destructor_ftpbuf (php_ftp.c:315)
==10519==    by 0xF63E8F: zend_resource_dtor (zend_list.c:74)
==10519==    by 0xF6493D: zend_close_rsrc_list (zend_list.c:230)
==10519==    by 0xEF1CF3: shutdown_executor (zend_execute_API.c:266)
==10519==    by 0xF252DE: zend_deactivate (zend.c:1178)
==10519==    by 0xE12F4B: php_request_shutdown (main.c:1945)
==10519==    by 0x119ECDC: do_cli (php_cli.c:1152)
==10519==    by 0x119F611: main (php_cli.c:1375)
==10519==  Address 0x1617c784 is 116 bytes inside a block of size 224 free'd
==10519==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==10519==    by 0xEB773F: _efree (zend_alloc.c:2541)
==10519==    by 0xE46AAE: _php_stream_free (streams.c:508)
==10519==    by 0xE4B03E: stream_resource_regular_dtor (streams.c:1590)
==10519==    by 0xF63E8F: zend_resource_dtor (zend_list.c:74)
==10519==    by 0xF6493D: zend_close_rsrc_list (zend_list.c:230)
==10519==    by 0xEF1CF3: shutdown_executor (zend_execute_API.c:266)
==10519==    by 0xF252DE: zend_deactivate (zend.c:1178)
==10519==    by 0xE12F4B: php_request_shutdown (main.c:1945)
==10519==    by 0x119ECDC: do_cli (php_cli.c:1152)
==10519==    by 0x119F611: main (php_cli.c:1375)
==10519==  Block was alloc'd at
==10519==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==10519==    by 0xEBB3C1: __zend_malloc (zend_alloc.c:2933)
==10519==    by 0xEB356D: _emalloc_224 (zend_alloc.c:2454)
==10519==    by 0xE45F35: _php_stream_alloc (streams.c:276)
==10519==    by 0xE548B8: _php_stream_fopen_from_fd_int (plain_wrapper.c:184)
==10519==    by 0xE54BF6: _php_stream_fopen_from_fd (plain_wrapper.c:246)
==10519==    by 0xE56DAB: _php_stream_fopen (plain_wrapper.c:1053)
==10519==    by 0xE5739D: php_plain_files_stream_opener (plain_wrapper.c:1109)
==10519==    by 0xE4D41A: _php_stream_open_wrapper_ex (streams.c:2030)
==10519==    by 0x6BEA05: zif_ftp_nb_get (php_ftp.c:1040)
==10519==    by 0x116E2D2: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:912)
==10519==    by 0x116E2D2: execute_ex (zend_vm_execute.h:60369)
==10519==    by 0x1197C83: zend_execute (zend_vm_execute.h:66602)
==10519== 
==10519== Invalid read of size 1
==10519==    at 0xE462E3: _php_stream_free (streams.c:386)
==10519==    by 0x6C1619: ftp_close (ftp.c:175)
==10519==    by 0x6BB800: ftp_destructor_ftpbuf (php_ftp.c:315)
==10519==    by 0xF63E8F: zend_resource_dtor (zend_list.c:74)
==10519==    by 0xF6493D: zend_close_rsrc_list (zend_list.c:230)
==10519==    by 0xEF1CF3: shutdown_executor (zend_execute_API.c:266)
==10519==    by 0xF252DE: zend_deactivate (zend.c:1178)
==10519==    by 0xE12F4B: php_request_shutdown (main.c:1945)
==10519==    by 0x119ECDC: do_cli (php_cli.c:1152)
==10519==    by 0x119F611: main (php_cli.c:1375)
==10519==  Address 0x1617c770 is 96 bytes inside a block of size 224 free'd
==10519==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==10519==    by 0xEB773F: _efree (zend_alloc.c:2541)
==10519==    by 0xE46AAE: _php_stream_free (streams.c:508)
==10519==    by 0xE4B03E: stream_resource_regular_dtor (streams.c:1590)
==10519==    by 0xF63E8F: zend_resource_dtor (zend_list.c:74)
==10519==    by 0xF6493D: zend_close_rsrc_list (zend_list.c:230)
==10519==    by 0xEF1CF3: shutdown_executor (zend_execute_API.c:266)
==10519==    by 0xF252DE: zend_deactivate (zend.c:1178)
==10519==    by 0xE12F4B: php_request_shutdown (main.c:1945)
==10519==    by 0x119ECDC: do_cli (php_cli.c:1152)
==10519==    by 0x119F611: main (php_cli.c:1375)
==10519==  Block was alloc'd at
==10519==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==10519==    by 0xEBB3C1: __zend_malloc (zend_alloc.c:2933)
==10519==    by 0xEB356D: _emalloc_224 (zend_alloc.c:2454)
==10519==    by 0xE45F35: _php_stream_alloc (streams.c:276)
==10519==    by 0xE548B8: _php_stream_fopen_from_fd_int (plain_wrapper.c:184)
==10519==    by 0xE54BF6: _php_stream_fopen_from_fd (plain_wrapper.c:246)
==10519==    by 0xE56DAB: _php_stream_fopen (plain_wrapper.c:1053)
==10519==    by 0xE5739D: php_plain_files_stream_opener (plain_wrapper.c:1109)
==10519==    by 0xE4D41A: _php_stream_open_wrapper_ex (streams.c:2030)
==10519==    by 0x6BEA05: zif_ftp_nb_get (php_ftp.c:1040)
==10519==    by 0x116E2D2: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:912)
==10519==    by 0x116E2D2: execute_ex (zend_vm_execute.h:60369)
==10519==    by 0x1197C83: zend_execute (zend_vm_execute.h:66602)
==10519== 
==10519== Invalid read of size 1
==10519==    at 0xE462F6: _php_stream_free (streams.c:388)
==10519==    by 0x6C1619: ftp_close (ftp.c:175)
==10519==    by 0x6BB800: ftp_destructor_ftpbuf (php_ftp.c:315)
==10519==    by 0xF63E8F: zend_resource_dtor (zend_list.c:74)
==10519==    by 0xF6493D: zend_close_rsrc_list (zend_list.c:230)
==10519==    by 0xEF1CF3: shutdown_executor (zend_execute_API.c:266)
==10519==    by 0xF252DE: zend_deactivate (zend.c:1178)
==10519==    by 0xE12F4B: php_request_shutdown (main.c:1945)
==10519==    by 0x119ECDC: do_cli (php_cli.c:1152)
==10519==    by 0x119F611: main (php_cli.c:1375)
==10519==  Address 0x1617c770 is 96 bytes inside a block of size 224 free'd
==10519==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==10519==    by 0xEB773F: _efree (zend_alloc.c:2541)
==10519==    by 0xE46AAE: _php_stream_free (streams.c:508)
==10519==    by 0xE4B03E: stream_resource_regular_dtor (streams.c:1590)
==10519==    by 0xF63E8F: zend_resource_dtor (zend_list.c:74)
==10519==    by 0xF6493D: zend_close_rsrc_list (zend_list.c:230)
==10519==    by 0xEF1CF3: shutdown_executor (zend_execute_API.c:266)
==10519==    by 0xF252DE: zend_deactivate (zend.c:1178)
==10519==    by 0xE12F4B: php_request_shutdown (main.c:1945)
==10519==    by 0x119ECDC: do_cli (php_cli.c:1152)
==10519==    by 0x119F611: main (php_cli.c:1375)
==10519==  Block was alloc'd at
==10519==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==10519==    by 0xEBB3C1: __zend_malloc (zend_alloc.c:2933)
==10519==    by 0xEB356D: _emalloc_224 (zend_alloc.c:2454)
==10519==    by 0xE45F35: _php_stream_alloc (streams.c:276)
==10519==    by 0xE548B8: _php_stream_fopen_from_fd_int (plain_wrapper.c:184)
==10519==    by 0xE54BF6: _php_stream_fopen_from_fd (plain_wrapper.c:246)
==10519==    by 0xE56DAB: _php_stream_fopen (plain_wrapper.c:1053)
==10519==    by 0xE5739D: php_plain_files_stream_opener (plain_wrapper.c:1109)
==10519==    by 0xE4D41A: _php_stream_open_wrapper_ex (streams.c:2030)
==10519==    by 0x6BEA05: zif_ftp_nb_get (php_ftp.c:1040)
==10519==    by 0x116E2D2: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:912)
==10519==    by 0x116E2D2: execute_ex (zend_vm_execute.h:60369)
==10519==    by 0x1197C83: zend_execute (zend_vm_execute.h:66602)
==10519== 

 

Generated at Mon, 06 May 2019 17:58:35 +0000 (295 days ago)

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