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

==21585== Invalid read of size 8
==21585==    at 0xFE6B4E: _php_stream_free (streams.c:367)
==21585==    by 0x81375F: ftp_close (ftp.c:171)
==21585==    by 0x80D979: ftp_destructor_ftpbuf (php_ftp.c:317)
==21585==    by 0x110F087: zend_resource_dtor (zend_list.c:76)
==21585==    by 0x110FA8F: zend_close_rsrc (zend_list.c:230)
==21585==    by 0x1105096: zend_hash_reverse_apply (zend_hash.c:1650)
==21585==    by 0x110FAD9: zend_close_rsrc_list (zend_list.c:238)
==21585==    by 0x1097C58: shutdown_executor (zend_execute_API.c:262)
==21585==    by 0x10CB834: zend_deactivate (zend.c:1050)
==21585==    by 0xFB5A7C: php_request_shutdown (main.c:1767)
==21585==    by 0x133E61E: do_cli (php_cli.c:1178)
==21585==    by 0x133EEE9: main (php_cli.c:1404)
==21585==  Address 0x15020af0 is 144 bytes inside a block of size 224 free'd
==21585==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==21585==    by 0x10603FD: _efree (zend_alloc.c:2499)
==21585==    by 0xFE738E: _php_stream_free (streams.c:505)
==21585==    by 0xFEBA32: stream_resource_regular_dtor (streams.c:1583)
==21585==    by 0x110F087: zend_resource_dtor (zend_list.c:76)
==21585==    by 0x110FA8F: zend_close_rsrc (zend_list.c:230)
==21585==    by 0x1105096: zend_hash_reverse_apply (zend_hash.c:1650)
==21585==    by 0x110FAD9: zend_close_rsrc_list (zend_list.c:238)
==21585==    by 0x1097C58: shutdown_executor (zend_execute_API.c:262)
==21585==    by 0x10CB834: zend_deactivate (zend.c:1050)
==21585==    by 0xFB5A7C: php_request_shutdown (main.c:1767)
==21585==    by 0x133E61E: do_cli (php_cli.c:1178)
==21585==  Block was alloc'd at
==21585==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==21585==    by 0x1064168: __zend_malloc (zend_alloc.c:2884)
==21585==    by 0x105C156: _emalloc_224 (zend_alloc.c:2407)
==21585==    by 0xFE6812: _php_stream_alloc (streams.c:273)
==21585==    by 0xFF4F44: _php_stream_fopen_from_fd_int (plain_wrapper.c:186)
==21585==    by 0xFF5272: _php_stream_fopen_from_fd (plain_wrapper.c:248)
==21585==    by 0xFF74E8: _php_stream_fopen (plain_wrapper.c:1024)
==21585==    by 0xFF79F1: php_plain_files_stream_opener (plain_wrapper.c:1080)
==21585==    by 0xFEDD05: _php_stream_open_wrapper_ex (streams.c:2022)
==21585==    by 0x810B38: zif_ftp_nb_get (php_ftp.c:1042)
==21585==    by 0x11AF69A: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:573)
==21585==    by 0x133764A: execute_ex (zend_vm_execute.h:59994)
==21585== 
==21585== Invalid read of size 4
==21585==    at 0xFE6B9C: _php_stream_free (streams.c:370)
==21585==    by 0x81375F: ftp_close (ftp.c:171)
==21585==    by 0x80D979: ftp_destructor_ftpbuf (php_ftp.c:317)
==21585==    by 0x110F087: zend_resource_dtor (zend_list.c:76)
==21585==    by 0x110FA8F: zend_close_rsrc (zend_list.c:230)
==21585==    by 0x1105096: zend_hash_reverse_apply (zend_hash.c:1650)
==21585==    by 0x110FAD9: zend_close_rsrc_list (zend_list.c:238)
==21585==    by 0x1097C58: shutdown_executor (zend_execute_API.c:262)
==21585==    by 0x10CB834: zend_deactivate (zend.c:1050)
==21585==    by 0xFB5A7C: php_request_shutdown (main.c:1767)
==21585==    by 0x133E61E: do_cli (php_cli.c:1178)
==21585==    by 0x133EEE9: main (php_cli.c:1404)
==21585==  Address 0x15020ad4 is 116 bytes inside a block of size 224 free'd
==21585==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==21585==    by 0x10603FD: _efree (zend_alloc.c:2499)
==21585==    by 0xFE738E: _php_stream_free (streams.c:505)
==21585==    by 0xFEBA32: stream_resource_regular_dtor (streams.c:1583)
==21585==    by 0x110F087: zend_resource_dtor (zend_list.c:76)
==21585==    by 0x110FA8F: zend_close_rsrc (zend_list.c:230)
==21585==    by 0x1105096: zend_hash_reverse_apply (zend_hash.c:1650)
==21585==    by 0x110FAD9: zend_close_rsrc_list (zend_list.c:238)
==21585==    by 0x1097C58: shutdown_executor (zend_execute_API.c:262)
==21585==    by 0x10CB834: zend_deactivate (zend.c:1050)
==21585==    by 0xFB5A7C: php_request_shutdown (main.c:1767)
==21585==    by 0x133E61E: do_cli (php_cli.c:1178)
==21585==  Block was alloc'd at
==21585==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==21585==    by 0x1064168: __zend_malloc (zend_alloc.c:2884)
==21585==    by 0x105C156: _emalloc_224 (zend_alloc.c:2407)
==21585==    by 0xFE6812: _php_stream_alloc (streams.c:273)
==21585==    by 0xFF4F44: _php_stream_fopen_from_fd_int (plain_wrapper.c:186)
==21585==    by 0xFF5272: _php_stream_fopen_from_fd (plain_wrapper.c:248)
==21585==    by 0xFF74E8: _php_stream_fopen (plain_wrapper.c:1024)
==21585==    by 0xFF79F1: php_plain_files_stream_opener (plain_wrapper.c:1080)
==21585==    by 0xFEDD05: _php_stream_open_wrapper_ex (streams.c:2022)
==21585==    by 0x810B38: zif_ftp_nb_get (php_ftp.c:1042)
==21585==    by 0x11AF69A: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:573)
==21585==    by 0x133764A: execute_ex (zend_vm_execute.h:59994)
==21585== 
==21585== Invalid read of size 1
==21585==    at 0xFE6BC3: _php_stream_free (streams.c:383)
==21585==    by 0x81375F: ftp_close (ftp.c:171)
==21585==    by 0x80D979: ftp_destructor_ftpbuf (php_ftp.c:317)
==21585==    by 0x110F087: zend_resource_dtor (zend_list.c:76)
==21585==    by 0x110FA8F: zend_close_rsrc (zend_list.c:230)
==21585==    by 0x1105096: zend_hash_reverse_apply (zend_hash.c:1650)
==21585==    by 0x110FAD9: zend_close_rsrc_list (zend_list.c:238)
==21585==    by 0x1097C58: shutdown_executor (zend_execute_API.c:262)
==21585==    by 0x10CB834: zend_deactivate (zend.c:1050)
==21585==    by 0xFB5A7C: php_request_shutdown (main.c:1767)
==21585==    by 0x133E61E: do_cli (php_cli.c:1178)
==21585==    by 0x133EEE9: main (php_cli.c:1404)
==21585==  Address 0x15020ac0 is 96 bytes inside a block of size 224 free'd
==21585==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==21585==    by 0x10603FD: _efree (zend_alloc.c:2499)
==21585==    by 0xFE738E: _php_stream_free (streams.c:505)
==21585==    by 0xFEBA32: stream_resource_regular_dtor (streams.c:1583)
==21585==    by 0x110F087: zend_resource_dtor (zend_list.c:76)
==21585==    by 0x110FA8F: zend_close_rsrc (zend_list.c:230)
==21585==    by 0x1105096: zend_hash_reverse_apply (zend_hash.c:1650)
==21585==    by 0x110FAD9: zend_close_rsrc_list (zend_list.c:238)
==21585==    by 0x1097C58: shutdown_executor (zend_execute_API.c:262)
==21585==    by 0x10CB834: zend_deactivate (zend.c:1050)
==21585==    by 0xFB5A7C: php_request_shutdown (main.c:1767)
==21585==    by 0x133E61E: do_cli (php_cli.c:1178)
==21585==  Block was alloc'd at
==21585==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==21585==    by 0x1064168: __zend_malloc (zend_alloc.c:2884)
==21585==    by 0x105C156: _emalloc_224 (zend_alloc.c:2407)
==21585==    by 0xFE6812: _php_stream_alloc (streams.c:273)
==21585==    by 0xFF4F44: _php_stream_fopen_from_fd_int (plain_wrapper.c:186)
==21585==    by 0xFF5272: _php_stream_fopen_from_fd (plain_wrapper.c:248)
==21585==    by 0xFF74E8: _php_stream_fopen (plain_wrapper.c:1024)
==21585==    by 0xFF79F1: php_plain_files_stream_opener (plain_wrapper.c:1080)
==21585==    by 0xFEDD05: _php_stream_open_wrapper_ex (streams.c:2022)
==21585==    by 0x810B38: zif_ftp_nb_get (php_ftp.c:1042)
==21585==    by 0x11AF69A: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:573)
==21585==    by 0x133764A: execute_ex (zend_vm_execute.h:59994)
==21585== 
==21585== Invalid read of size 1
==21585==    at 0xFE6BD6: _php_stream_free (streams.c:385)
==21585==    by 0x81375F: ftp_close (ftp.c:171)
==21585==    by 0x80D979: ftp_destructor_ftpbuf (php_ftp.c:317)
==21585==    by 0x110F087: zend_resource_dtor (zend_list.c:76)
==21585==    by 0x110FA8F: zend_close_rsrc (zend_list.c:230)
==21585==    by 0x1105096: zend_hash_reverse_apply (zend_hash.c:1650)
==21585==    by 0x110FAD9: zend_close_rsrc_list (zend_list.c:238)
==21585==    by 0x1097C58: shutdown_executor (zend_execute_API.c:262)
==21585==    by 0x10CB834: zend_deactivate (zend.c:1050)
==21585==    by 0xFB5A7C: php_request_shutdown (main.c:1767)
==21585==    by 0x133E61E: do_cli (php_cli.c:1178)
==21585==    by 0x133EEE9: main (php_cli.c:1404)
==21585==  Address 0x15020ac0 is 96 bytes inside a block of size 224 free'd
==21585==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==21585==    by 0x10603FD: _efree (zend_alloc.c:2499)
==21585==    by 0xFE738E: _php_stream_free (streams.c:505)
==21585==    by 0xFEBA32: stream_resource_regular_dtor (streams.c:1583)
==21585==    by 0x110F087: zend_resource_dtor (zend_list.c:76)
==21585==    by 0x110FA8F: zend_close_rsrc (zend_list.c:230)
==21585==    by 0x1105096: zend_hash_reverse_apply (zend_hash.c:1650)
==21585==    by 0x110FAD9: zend_close_rsrc_list (zend_list.c:238)
==21585==    by 0x1097C58: shutdown_executor (zend_execute_API.c:262)
==21585==    by 0x10CB834: zend_deactivate (zend.c:1050)
==21585==    by 0xFB5A7C: php_request_shutdown (main.c:1767)
==21585==    by 0x133E61E: do_cli (php_cli.c:1178)
==21585==  Block was alloc'd at
==21585==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==21585==    by 0x1064168: __zend_malloc (zend_alloc.c:2884)
==21585==    by 0x105C156: _emalloc_224 (zend_alloc.c:2407)
==21585==    by 0xFE6812: _php_stream_alloc (streams.c:273)
==21585==    by 0xFF4F44: _php_stream_fopen_from_fd_int (plain_wrapper.c:186)
==21585==    by 0xFF5272: _php_stream_fopen_from_fd (plain_wrapper.c:248)
==21585==    by 0xFF74E8: _php_stream_fopen (plain_wrapper.c:1024)
==21585==    by 0xFF79F1: php_plain_files_stream_opener (plain_wrapper.c:1080)
==21585==    by 0xFEDD05: _php_stream_open_wrapper_ex (streams.c:2022)
==21585==    by 0x810B38: zif_ftp_nb_get (php_ftp.c:1042)
==21585==    by 0x11AF69A: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:573)
==21585==    by 0x133764A: execute_ex (zend_vm_execute.h:59994)
==21585== 

 

Generated at Sun, 12 Nov 2017 21:17:35 +0000 (6 days ago)

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