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

==22270== Invalid read of size 8
==22270==    at 0x10ADD24: _php_stream_free (streams.c:372)
==22270==    by 0x851779: ftp_close (ftp.c:175)
==22270==    by 0x84B9F3: ftp_destructor_ftpbuf (php_ftp.c:315)
==22270==    by 0x11CDAE5: zend_resource_dtor (zend_list.c:74)
==22270==    by 0x11CE50C: zend_close_rsrc (zend_list.c:228)
==22270==    by 0x11C33E8: zend_hash_reverse_apply (zend_hash.c:1772)
==22270==    by 0x11CE558: zend_close_rsrc_list (zend_list.c:236)
==22270==    by 0x115BFFB: shutdown_executor (zend_execute_API.c:265)
==22270==    by 0x118E48E: zend_deactivate (zend.c:1104)
==22270==    by 0x107A323: php_request_shutdown (main.c:1928)
==22270==    by 0x13DE7F4: do_cli (php_cli.c:1167)
==22270==    by 0x13DF1BD: main (php_cli.c:1396)
==22270==  Address 0x1669efe0 is 144 bytes inside a block of size 224 free'd
==22270==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==22270==    by 0x11206D5: _efree (zend_alloc.c:2516)
==22270==    by 0x10AE5F6: _php_stream_free (streams.c:516)
==22270==    by 0x10B3071: stream_resource_regular_dtor (streams.c:1606)
==22270==    by 0x11CDAE5: zend_resource_dtor (zend_list.c:74)
==22270==    by 0x11CE50C: zend_close_rsrc (zend_list.c:228)
==22270==    by 0x11C33E8: zend_hash_reverse_apply (zend_hash.c:1772)
==22270==    by 0x11CE558: zend_close_rsrc_list (zend_list.c:236)
==22270==    by 0x115BFFB: shutdown_executor (zend_execute_API.c:265)
==22270==    by 0x118E48E: zend_deactivate (zend.c:1104)
==22270==    by 0x107A323: php_request_shutdown (main.c:1928)
==22270==    by 0x13DE7F4: do_cli (php_cli.c:1167)
==22270==  Block was alloc'd at
==22270==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==22270==    by 0x1124415: __zend_malloc (zend_alloc.c:2909)
==22270==    by 0x111C47B: _emalloc_224 (zend_alloc.c:2429)
==22270==    by 0x10AD9EB: _php_stream_alloc (streams.c:278)
==22270==    by 0x10BC8F3: _php_stream_fopen_from_fd_int (plain_wrapper.c:184)
==22270==    by 0x10BCC31: _php_stream_fopen_from_fd (plain_wrapper.c:246)
==22270==    by 0x10BEDBD: _php_stream_fopen (plain_wrapper.c:1061)
==22270==    by 0x10BF3C3: php_plain_files_stream_opener (plain_wrapper.c:1117)
==22270==    by 0x10B544D: _php_stream_open_wrapper_ex (streams.c:2046)
==22270==    by 0x84EB65: zif_ftp_nb_get (php_ftp.c:1040)
==22270==    by 0x13AF7ED: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:649)
==22270==    by 0x13AF7ED: execute_ex (zend_vm_execute.h:55499)
==22270==    by 0x13D78A5: zend_execute (zend_vm_execute.h:60935)
==22270== 
==22270== Invalid read of size 4
==22270==    at 0x10ADD72: _php_stream_free (streams.c:375)
==22270==    by 0x851779: ftp_close (ftp.c:175)
==22270==    by 0x84B9F3: ftp_destructor_ftpbuf (php_ftp.c:315)
==22270==    by 0x11CDAE5: zend_resource_dtor (zend_list.c:74)
==22270==    by 0x11CE50C: zend_close_rsrc (zend_list.c:228)
==22270==    by 0x11C33E8: zend_hash_reverse_apply (zend_hash.c:1772)
==22270==    by 0x11CE558: zend_close_rsrc_list (zend_list.c:236)
==22270==    by 0x115BFFB: shutdown_executor (zend_execute_API.c:265)
==22270==    by 0x118E48E: zend_deactivate (zend.c:1104)
==22270==    by 0x107A323: php_request_shutdown (main.c:1928)
==22270==    by 0x13DE7F4: do_cli (php_cli.c:1167)
==22270==    by 0x13DF1BD: main (php_cli.c:1396)
==22270==  Address 0x1669efc4 is 116 bytes inside a block of size 224 free'd
==22270==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==22270==    by 0x11206D5: _efree (zend_alloc.c:2516)
==22270==    by 0x10AE5F6: _php_stream_free (streams.c:516)
==22270==    by 0x10B3071: stream_resource_regular_dtor (streams.c:1606)
==22270==    by 0x11CDAE5: zend_resource_dtor (zend_list.c:74)
==22270==    by 0x11CE50C: zend_close_rsrc (zend_list.c:228)
==22270==    by 0x11C33E8: zend_hash_reverse_apply (zend_hash.c:1772)
==22270==    by 0x11CE558: zend_close_rsrc_list (zend_list.c:236)
==22270==    by 0x115BFFB: shutdown_executor (zend_execute_API.c:265)
==22270==    by 0x118E48E: zend_deactivate (zend.c:1104)
==22270==    by 0x107A323: php_request_shutdown (main.c:1928)
==22270==    by 0x13DE7F4: do_cli (php_cli.c:1167)
==22270==  Block was alloc'd at
==22270==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==22270==    by 0x1124415: __zend_malloc (zend_alloc.c:2909)
==22270==    by 0x111C47B: _emalloc_224 (zend_alloc.c:2429)
==22270==    by 0x10AD9EB: _php_stream_alloc (streams.c:278)
==22270==    by 0x10BC8F3: _php_stream_fopen_from_fd_int (plain_wrapper.c:184)
==22270==    by 0x10BCC31: _php_stream_fopen_from_fd (plain_wrapper.c:246)
==22270==    by 0x10BEDBD: _php_stream_fopen (plain_wrapper.c:1061)
==22270==    by 0x10BF3C3: php_plain_files_stream_opener (plain_wrapper.c:1117)
==22270==    by 0x10B544D: _php_stream_open_wrapper_ex (streams.c:2046)
==22270==    by 0x84EB65: zif_ftp_nb_get (php_ftp.c:1040)
==22270==    by 0x13AF7ED: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:649)
==22270==    by 0x13AF7ED: execute_ex (zend_vm_execute.h:55499)
==22270==    by 0x13D78A5: zend_execute (zend_vm_execute.h:60935)
==22270== 
==22270== Invalid read of size 1
==22270==    at 0x10ADD99: _php_stream_free (streams.c:388)
==22270==    by 0x851779: ftp_close (ftp.c:175)
==22270==    by 0x84B9F3: ftp_destructor_ftpbuf (php_ftp.c:315)
==22270==    by 0x11CDAE5: zend_resource_dtor (zend_list.c:74)
==22270==    by 0x11CE50C: zend_close_rsrc (zend_list.c:228)
==22270==    by 0x11C33E8: zend_hash_reverse_apply (zend_hash.c:1772)
==22270==    by 0x11CE558: zend_close_rsrc_list (zend_list.c:236)
==22270==    by 0x115BFFB: shutdown_executor (zend_execute_API.c:265)
==22270==    by 0x118E48E: zend_deactivate (zend.c:1104)
==22270==    by 0x107A323: php_request_shutdown (main.c:1928)
==22270==    by 0x13DE7F4: do_cli (php_cli.c:1167)
==22270==    by 0x13DF1BD: main (php_cli.c:1396)
==22270==  Address 0x1669efb0 is 96 bytes inside a block of size 224 free'd
==22270==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==22270==    by 0x11206D5: _efree (zend_alloc.c:2516)
==22270==    by 0x10AE5F6: _php_stream_free (streams.c:516)
==22270==    by 0x10B3071: stream_resource_regular_dtor (streams.c:1606)
==22270==    by 0x11CDAE5: zend_resource_dtor (zend_list.c:74)
==22270==    by 0x11CE50C: zend_close_rsrc (zend_list.c:228)
==22270==    by 0x11C33E8: zend_hash_reverse_apply (zend_hash.c:1772)
==22270==    by 0x11CE558: zend_close_rsrc_list (zend_list.c:236)
==22270==    by 0x115BFFB: shutdown_executor (zend_execute_API.c:265)
==22270==    by 0x118E48E: zend_deactivate (zend.c:1104)
==22270==    by 0x107A323: php_request_shutdown (main.c:1928)
==22270==    by 0x13DE7F4: do_cli (php_cli.c:1167)
==22270==  Block was alloc'd at
==22270==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==22270==    by 0x1124415: __zend_malloc (zend_alloc.c:2909)
==22270==    by 0x111C47B: _emalloc_224 (zend_alloc.c:2429)
==22270==    by 0x10AD9EB: _php_stream_alloc (streams.c:278)
==22270==    by 0x10BC8F3: _php_stream_fopen_from_fd_int (plain_wrapper.c:184)
==22270==    by 0x10BCC31: _php_stream_fopen_from_fd (plain_wrapper.c:246)
==22270==    by 0x10BEDBD: _php_stream_fopen (plain_wrapper.c:1061)
==22270==    by 0x10BF3C3: php_plain_files_stream_opener (plain_wrapper.c:1117)
==22270==    by 0x10B544D: _php_stream_open_wrapper_ex (streams.c:2046)
==22270==    by 0x84EB65: zif_ftp_nb_get (php_ftp.c:1040)
==22270==    by 0x13AF7ED: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:649)
==22270==    by 0x13AF7ED: execute_ex (zend_vm_execute.h:55499)
==22270==    by 0x13D78A5: zend_execute (zend_vm_execute.h:60935)
==22270== 
==22270== Invalid read of size 1
==22270==    at 0x10ADDAC: _php_stream_free (streams.c:390)
==22270==    by 0x851779: ftp_close (ftp.c:175)
==22270==    by 0x84B9F3: ftp_destructor_ftpbuf (php_ftp.c:315)
==22270==    by 0x11CDAE5: zend_resource_dtor (zend_list.c:74)
==22270==    by 0x11CE50C: zend_close_rsrc (zend_list.c:228)
==22270==    by 0x11C33E8: zend_hash_reverse_apply (zend_hash.c:1772)
==22270==    by 0x11CE558: zend_close_rsrc_list (zend_list.c:236)
==22270==    by 0x115BFFB: shutdown_executor (zend_execute_API.c:265)
==22270==    by 0x118E48E: zend_deactivate (zend.c:1104)
==22270==    by 0x107A323: php_request_shutdown (main.c:1928)
==22270==    by 0x13DE7F4: do_cli (php_cli.c:1167)
==22270==    by 0x13DF1BD: main (php_cli.c:1396)
==22270==  Address 0x1669efb0 is 96 bytes inside a block of size 224 free'd
==22270==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==22270==    by 0x11206D5: _efree (zend_alloc.c:2516)
==22270==    by 0x10AE5F6: _php_stream_free (streams.c:516)
==22270==    by 0x10B3071: stream_resource_regular_dtor (streams.c:1606)
==22270==    by 0x11CDAE5: zend_resource_dtor (zend_list.c:74)
==22270==    by 0x11CE50C: zend_close_rsrc (zend_list.c:228)
==22270==    by 0x11C33E8: zend_hash_reverse_apply (zend_hash.c:1772)
==22270==    by 0x11CE558: zend_close_rsrc_list (zend_list.c:236)
==22270==    by 0x115BFFB: shutdown_executor (zend_execute_API.c:265)
==22270==    by 0x118E48E: zend_deactivate (zend.c:1104)
==22270==    by 0x107A323: php_request_shutdown (main.c:1928)
==22270==    by 0x13DE7F4: do_cli (php_cli.c:1167)
==22270==  Block was alloc'd at
==22270==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==22270==    by 0x1124415: __zend_malloc (zend_alloc.c:2909)
==22270==    by 0x111C47B: _emalloc_224 (zend_alloc.c:2429)
==22270==    by 0x10AD9EB: _php_stream_alloc (streams.c:278)
==22270==    by 0x10BC8F3: _php_stream_fopen_from_fd_int (plain_wrapper.c:184)
==22270==    by 0x10BCC31: _php_stream_fopen_from_fd (plain_wrapper.c:246)
==22270==    by 0x10BEDBD: _php_stream_fopen (plain_wrapper.c:1061)
==22270==    by 0x10BF3C3: php_plain_files_stream_opener (plain_wrapper.c:1117)
==22270==    by 0x10B544D: _php_stream_open_wrapper_ex (streams.c:2046)
==22270==    by 0x84EB65: zif_ftp_nb_get (php_ftp.c:1040)
==22270==    by 0x13AF7ED: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:649)
==22270==    by 0x13AF7ED: execute_ex (zend_vm_execute.h:55499)
==22270==    by 0x13D78A5: zend_execute (zend_vm_execute.h:60935)
==22270== 

 

Generated at Thu, 09 Sep 2021 23:07:45 +0000 (6 days ago)

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