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

==30323== Invalid read of size 8
==30323==    at 0x109A89A: _php_stream_free (streams.c:366)
==30323==    by 0x8442A4: ftp_close (ftp.c:169)
==30323==    by 0x83E51E: ftp_destructor_ftpbuf (php_ftp.c:315)
==30323==    by 0x11B912E: zend_resource_dtor (zend_list.c:74)
==30323==    by 0x11B9B55: zend_close_rsrc (zend_list.c:228)
==30323==    by 0x11AE8B5: zend_hash_reverse_apply (zend_hash.c:1834)
==30323==    by 0x11B9BA1: zend_close_rsrc_list (zend_list.c:236)
==30323==    by 0x1146C7D: shutdown_executor (zend_execute_API.c:265)
==30323==    by 0x1178F2F: zend_deactivate (zend.c:1104)
==30323==    by 0x1067381: php_request_shutdown (main.c:1938)
==30323==    by 0x13C832F: do_cli (php_cli.c:1164)
==30323==    by 0x13C8C64: main (php_cli.c:1390)
==30323==  Address 0x159b8060 is 144 bytes inside a block of size 224 free'd
==30323==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==30323==    by 0x110BD8E: _efree (zend_alloc.c:2508)
==30323==    by 0x109B0DA: _php_stream_free (streams.c:504)
==30323==    by 0x109F6A2: stream_resource_regular_dtor (streams.c:1586)
==30323==    by 0x11B912E: zend_resource_dtor (zend_list.c:74)
==30323==    by 0x11B9B55: zend_close_rsrc (zend_list.c:228)
==30323==    by 0x11AE8B5: zend_hash_reverse_apply (zend_hash.c:1834)
==30323==    by 0x11B9BA1: zend_close_rsrc_list (zend_list.c:236)
==30323==    by 0x1146C7D: shutdown_executor (zend_execute_API.c:265)
==30323==    by 0x1178F2F: zend_deactivate (zend.c:1104)
==30323==    by 0x1067381: php_request_shutdown (main.c:1938)
==30323==    by 0x13C832F: do_cli (php_cli.c:1164)
==30323==  Block was alloc'd at
==30323==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==30323==    by 0x110FA71: __zend_malloc (zend_alloc.c:2900)
==30323==    by 0x1107B34: _emalloc_224 (zend_alloc.c:2421)
==30323==    by 0x109A561: _php_stream_alloc (streams.c:272)
==30323==    by 0x10A8F0E: _php_stream_fopen_from_fd_int (plain_wrapper.c:184)
==30323==    by 0x10A924C: _php_stream_fopen_from_fd (plain_wrapper.c:246)
==30323==    by 0x10AB461: _php_stream_fopen (plain_wrapper.c:1054)
==30323==    by 0x10ABA67: php_plain_files_stream_opener (plain_wrapper.c:1110)
==30323==    by 0x10A1A68: _php_stream_open_wrapper_ex (streams.c:2024)
==30323==    by 0x841690: zif_ftp_nb_get (php_ftp.c:1040)
==30323==    by 0x1399449: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:645)
==30323==    by 0x1399449: execute_ex (zend_vm_execute.h:55345)
==30323==    by 0x13C13E0: zend_execute (zend_vm_execute.h:60749)
==30323== 
==30323== Invalid read of size 4
==30323==    at 0x109A8E8: _php_stream_free (streams.c:369)
==30323==    by 0x8442A4: ftp_close (ftp.c:169)
==30323==    by 0x83E51E: ftp_destructor_ftpbuf (php_ftp.c:315)
==30323==    by 0x11B912E: zend_resource_dtor (zend_list.c:74)
==30323==    by 0x11B9B55: zend_close_rsrc (zend_list.c:228)
==30323==    by 0x11AE8B5: zend_hash_reverse_apply (zend_hash.c:1834)
==30323==    by 0x11B9BA1: zend_close_rsrc_list (zend_list.c:236)
==30323==    by 0x1146C7D: shutdown_executor (zend_execute_API.c:265)
==30323==    by 0x1178F2F: zend_deactivate (zend.c:1104)
==30323==    by 0x1067381: php_request_shutdown (main.c:1938)
==30323==    by 0x13C832F: do_cli (php_cli.c:1164)
==30323==    by 0x13C8C64: main (php_cli.c:1390)
==30323==  Address 0x159b8044 is 116 bytes inside a block of size 224 free'd
==30323==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==30323==    by 0x110BD8E: _efree (zend_alloc.c:2508)
==30323==    by 0x109B0DA: _php_stream_free (streams.c:504)
==30323==    by 0x109F6A2: stream_resource_regular_dtor (streams.c:1586)
==30323==    by 0x11B912E: zend_resource_dtor (zend_list.c:74)
==30323==    by 0x11B9B55: zend_close_rsrc (zend_list.c:228)
==30323==    by 0x11AE8B5: zend_hash_reverse_apply (zend_hash.c:1834)
==30323==    by 0x11B9BA1: zend_close_rsrc_list (zend_list.c:236)
==30323==    by 0x1146C7D: shutdown_executor (zend_execute_API.c:265)
==30323==    by 0x1178F2F: zend_deactivate (zend.c:1104)
==30323==    by 0x1067381: php_request_shutdown (main.c:1938)
==30323==    by 0x13C832F: do_cli (php_cli.c:1164)
==30323==  Block was alloc'd at
==30323==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==30323==    by 0x110FA71: __zend_malloc (zend_alloc.c:2900)
==30323==    by 0x1107B34: _emalloc_224 (zend_alloc.c:2421)
==30323==    by 0x109A561: _php_stream_alloc (streams.c:272)
==30323==    by 0x10A8F0E: _php_stream_fopen_from_fd_int (plain_wrapper.c:184)
==30323==    by 0x10A924C: _php_stream_fopen_from_fd (plain_wrapper.c:246)
==30323==    by 0x10AB461: _php_stream_fopen (plain_wrapper.c:1054)
==30323==    by 0x10ABA67: php_plain_files_stream_opener (plain_wrapper.c:1110)
==30323==    by 0x10A1A68: _php_stream_open_wrapper_ex (streams.c:2024)
==30323==    by 0x841690: zif_ftp_nb_get (php_ftp.c:1040)
==30323==    by 0x1399449: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:645)
==30323==    by 0x1399449: execute_ex (zend_vm_execute.h:55345)
==30323==    by 0x13C13E0: zend_execute (zend_vm_execute.h:60749)
==30323== 
==30323== Invalid read of size 1
==30323==    at 0x109A90F: _php_stream_free (streams.c:382)
==30323==    by 0x8442A4: ftp_close (ftp.c:169)
==30323==    by 0x83E51E: ftp_destructor_ftpbuf (php_ftp.c:315)
==30323==    by 0x11B912E: zend_resource_dtor (zend_list.c:74)
==30323==    by 0x11B9B55: zend_close_rsrc (zend_list.c:228)
==30323==    by 0x11AE8B5: zend_hash_reverse_apply (zend_hash.c:1834)
==30323==    by 0x11B9BA1: zend_close_rsrc_list (zend_list.c:236)
==30323==    by 0x1146C7D: shutdown_executor (zend_execute_API.c:265)
==30323==    by 0x1178F2F: zend_deactivate (zend.c:1104)
==30323==    by 0x1067381: php_request_shutdown (main.c:1938)
==30323==    by 0x13C832F: do_cli (php_cli.c:1164)
==30323==    by 0x13C8C64: main (php_cli.c:1390)
==30323==  Address 0x159b8030 is 96 bytes inside a block of size 224 free'd
==30323==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==30323==    by 0x110BD8E: _efree (zend_alloc.c:2508)
==30323==    by 0x109B0DA: _php_stream_free (streams.c:504)
==30323==    by 0x109F6A2: stream_resource_regular_dtor (streams.c:1586)
==30323==    by 0x11B912E: zend_resource_dtor (zend_list.c:74)
==30323==    by 0x11B9B55: zend_close_rsrc (zend_list.c:228)
==30323==    by 0x11AE8B5: zend_hash_reverse_apply (zend_hash.c:1834)
==30323==    by 0x11B9BA1: zend_close_rsrc_list (zend_list.c:236)
==30323==    by 0x1146C7D: shutdown_executor (zend_execute_API.c:265)
==30323==    by 0x1178F2F: zend_deactivate (zend.c:1104)
==30323==    by 0x1067381: php_request_shutdown (main.c:1938)
==30323==    by 0x13C832F: do_cli (php_cli.c:1164)
==30323==  Block was alloc'd at
==30323==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==30323==    by 0x110FA71: __zend_malloc (zend_alloc.c:2900)
==30323==    by 0x1107B34: _emalloc_224 (zend_alloc.c:2421)
==30323==    by 0x109A561: _php_stream_alloc (streams.c:272)
==30323==    by 0x10A8F0E: _php_stream_fopen_from_fd_int (plain_wrapper.c:184)
==30323==    by 0x10A924C: _php_stream_fopen_from_fd (plain_wrapper.c:246)
==30323==    by 0x10AB461: _php_stream_fopen (plain_wrapper.c:1054)
==30323==    by 0x10ABA67: php_plain_files_stream_opener (plain_wrapper.c:1110)
==30323==    by 0x10A1A68: _php_stream_open_wrapper_ex (streams.c:2024)
==30323==    by 0x841690: zif_ftp_nb_get (php_ftp.c:1040)
==30323==    by 0x1399449: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:645)
==30323==    by 0x1399449: execute_ex (zend_vm_execute.h:55345)
==30323==    by 0x13C13E0: zend_execute (zend_vm_execute.h:60749)
==30323== 
==30323== Invalid read of size 1
==30323==    at 0x109A922: _php_stream_free (streams.c:384)
==30323==    by 0x8442A4: ftp_close (ftp.c:169)
==30323==    by 0x83E51E: ftp_destructor_ftpbuf (php_ftp.c:315)
==30323==    by 0x11B912E: zend_resource_dtor (zend_list.c:74)
==30323==    by 0x11B9B55: zend_close_rsrc (zend_list.c:228)
==30323==    by 0x11AE8B5: zend_hash_reverse_apply (zend_hash.c:1834)
==30323==    by 0x11B9BA1: zend_close_rsrc_list (zend_list.c:236)
==30323==    by 0x1146C7D: shutdown_executor (zend_execute_API.c:265)
==30323==    by 0x1178F2F: zend_deactivate (zend.c:1104)
==30323==    by 0x1067381: php_request_shutdown (main.c:1938)
==30323==    by 0x13C832F: do_cli (php_cli.c:1164)
==30323==    by 0x13C8C64: main (php_cli.c:1390)
==30323==  Address 0x159b8030 is 96 bytes inside a block of size 224 free'd
==30323==    at 0x4C28BD4: free (vg_replace_malloc.c:529)
==30323==    by 0x110BD8E: _efree (zend_alloc.c:2508)
==30323==    by 0x109B0DA: _php_stream_free (streams.c:504)
==30323==    by 0x109F6A2: stream_resource_regular_dtor (streams.c:1586)
==30323==    by 0x11B912E: zend_resource_dtor (zend_list.c:74)
==30323==    by 0x11B9B55: zend_close_rsrc (zend_list.c:228)
==30323==    by 0x11AE8B5: zend_hash_reverse_apply (zend_hash.c:1834)
==30323==    by 0x11B9BA1: zend_close_rsrc_list (zend_list.c:236)
==30323==    by 0x1146C7D: shutdown_executor (zend_execute_API.c:265)
==30323==    by 0x1178F2F: zend_deactivate (zend.c:1104)
==30323==    by 0x1067381: php_request_shutdown (main.c:1938)
==30323==    by 0x13C832F: do_cli (php_cli.c:1164)
==30323==  Block was alloc'd at
==30323==    at 0x4C291FA: malloc (vg_replace_malloc.c:298)
==30323==    by 0x110FA71: __zend_malloc (zend_alloc.c:2900)
==30323==    by 0x1107B34: _emalloc_224 (zend_alloc.c:2421)
==30323==    by 0x109A561: _php_stream_alloc (streams.c:272)
==30323==    by 0x10A8F0E: _php_stream_fopen_from_fd_int (plain_wrapper.c:184)
==30323==    by 0x10A924C: _php_stream_fopen_from_fd (plain_wrapper.c:246)
==30323==    by 0x10AB461: _php_stream_fopen (plain_wrapper.c:1054)
==30323==    by 0x10ABA67: php_plain_files_stream_opener (plain_wrapper.c:1110)
==30323==    by 0x10A1A68: _php_stream_open_wrapper_ex (streams.c:2024)
==30323==    by 0x841690: zif_ftp_nb_get (php_ftp.c:1040)
==30323==    by 0x1399449: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:645)
==30323==    by 0x1399449: execute_ex (zend_vm_execute.h:55345)
==30323==    by 0x13C13E0: zend_execute (zend_vm_execute.h:60749)
==30323== 

 

Generated at Sat, 15 Sep 2018 00:36:54 +0000 (11 days ago)

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