Bug #75452 [Opn->Fbk]: ftp_nb_get_large.phpt generates valgrind warnings
| From: | cmb@php.net | Date: | Fri, 19 Feb 2021 15:02:45 +0000 |
| Subject: | Bug #75452 [Opn->Fbk]: ftp_nb_get_large.phpt generates valgrind warnings | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-232282@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=75452&edit=1
ID: 75452
Updated by: cmb@php.net
Reported by: nikic@php.net
Summary: ftp_nb_get_large.phpt generates valgrind warnings
-Status: Open
+Status: Feedback
Type: Bug
Package: FTP related
PHP Version: 7.2.0RC5
-Assigned To:
+Assigned To: cmb
Block user comment: N
Private report: N
New Comment:
I cannot reproduce this with PHP-7.4. Has this been resolved in
the meantime?
Previous Comments:
------------------------------------------------------------------------
[2017-10-29 17:10:54] yuliakostrikova at gmail dot com
How to reproduce it?
------------------------------------------------------------------------
[2017-10-28 14:28:47] nikic@php.net
Description:
------------
This problem did not exist in PHP 7.1.
==21348== Invalid read of size 8
==21348== at 0x99B7EB: _php_stream_free (streams.c:372)
==21348== by 0x66F4FF: ftp_close (ftp.c:171)
==21348== by 0x66B922: ftp_destructor_ftpbuf (php_ftp.c:317)
==21348== by 0xA5D26F: zend_resource_dtor (zend_list.c:76)
==21348== by 0xA5D88E: zend_close_rsrc (zend_list.c:230)
==21348== by 0xA5A215: zend_hash_reverse_apply (zend_hash.c:1597)
==21348== by 0xA5D8B4: zend_close_rsrc_list (zend_list.c:238)
==21348== by 0xA2051B: shutdown_executor (zend_execute_API.c:262)
==21348== by 0xA3F10F: zend_deactivate (zend.c:1036)
==21348== by 0x975F0D: php_request_shutdown (main.c:1904)
==21348== by 0xB45F99: do_cli (php_cli.c:1178)
==21348== by 0xB46940: main (php_cli.c:1404)
==21348== Address 0x92d59e0 is 144 bytes inside a block of size 224 free'd
==21348== at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21348== by 0x9FA9B5: _efree (zend_alloc.c:2444)
==21348== by 0x99BD03: _php_stream_free (streams.c:510)
==21348== by 0x99E67F: stream_resource_regular_dtor (streams.c:1588)
==21348== by 0xA5D26F: zend_resource_dtor (zend_list.c:76)
==21348== by 0xA5D88E: zend_close_rsrc (zend_list.c:230)
==21348== by 0xA5A215: zend_hash_reverse_apply (zend_hash.c:1597)
==21348== by 0xA5D8B4: zend_close_rsrc_list (zend_list.c:238)
==21348== by 0xA2051B: shutdown_executor (zend_execute_API.c:262)
==21348== by 0xA3F10F: zend_deactivate (zend.c:1036)
==21348== by 0x975F0D: php_request_shutdown (main.c:1904)
==21348== by 0xB45F99: do_cli (php_cli.c:1178)
==21348== Block was alloc'd at
==21348== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21348== by 0x9FBA4C: __zend_malloc (zend_alloc.c:2829)
==21348== by 0x9FA83A: _emalloc (zend_alloc.c:2429)
==21348== by 0x99B42E: _php_stream_alloc (streams.c:273)
==21348== by 0x9A531E: _php_stream_fopen_from_fd_int (plain_wrapper.c:186)
==21348== by 0x9A5691: _php_stream_fopen_from_fd (plain_wrapper.c:248)
==21348== by 0x9A6CBB: _php_stream_fopen (plain_wrapper.c:1024)
==21348== by 0x9A6F10: php_plain_files_stream_opener (plain_wrapper.c:1080)
==21348== by 0x9A00BE: _php_stream_open_wrapper_ex (streams.c:2024)
==21348== by 0x66D75E: zif_ftp_nb_get (php_ftp.c:1042)
==21348== by 0xAAEA62: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:573)
==21348== by 0xB3D1B4: execute_ex (zend_vm_execute.h:59734)
==21348==
==21348== Invalid read of size 4
==21348== at 0x99B815: _php_stream_free (streams.c:375)
==21348== by 0x66F4FF: ftp_close (ftp.c:171)
==21348== by 0x66B922: ftp_destructor_ftpbuf (php_ftp.c:317)
==21348== by 0xA5D26F: zend_resource_dtor (zend_list.c:76)
==21348== by 0xA5D88E: zend_close_rsrc (zend_list.c:230)
==21348== by 0xA5A215: zend_hash_reverse_apply (zend_hash.c:1597)
==21348== by 0xA5D8B4: zend_close_rsrc_list (zend_list.c:238)
==21348== by 0xA2051B: shutdown_executor (zend_execute_API.c:262)
==21348== by 0xA3F10F: zend_deactivate (zend.c:1036)
==21348== by 0x975F0D: php_request_shutdown (main.c:1904)
==21348== by 0xB45F99: do_cli (php_cli.c:1178)
==21348== by 0xB46940: main (php_cli.c:1404)
==21348== Address 0x92d59c4 is 116 bytes inside a block of size 224 free'd
==21348== at 0x4C2EDEB: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21348== by 0x9FA9B5: _efree (zend_alloc.c:2444)
==21348== by 0x99BD03: _php_stream_free (streams.c:510)
==21348== by 0x99E67F: stream_resource_regular_dtor (streams.c:1588)
==21348== by 0xA5D26F: zend_resource_dtor (zend_list.c:76)
==21348== by 0xA5D88E: zend_close_rsrc (zend_list.c:230)
==21348== by 0xA5A215: zend_hash_reverse_apply (zend_hash.c:1597)
==21348== by 0xA5D8B4: zend_close_rsrc_list (zend_list.c:238)
==21348== by 0xA2051B: shutdown_executor (zend_execute_API.c:262)
==21348== by 0xA3F10F: zend_deactivate (zend.c:1036)
==21348== by 0x975F0D: php_request_shutdown (main.c:1904)
==21348== by 0xB45F99: do_cli (php_cli.c:1178)
==21348== Block was alloc'd at
==21348== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==21348== by 0x9FBA4C: __zend_malloc (zend_alloc.c:2829)
==21348== by 0x9FA83A: _emalloc (zend_alloc.c:2429)
==21348== by 0x99B42E: _php_stream_alloc (streams.c:273)
==21348== by 0x9A531E: _php_stream_fopen_from_fd_int (plain_wrapper.c:186)
==21348== by 0x9A5691: _php_stream_fopen_from_fd (plain_wrapper.c:248)
==21348== by 0x9A6CBB: _php_stream_fopen (plain_wrapper.c:1024)
==21348== by 0x9A6F10: php_plain_files_stream_opener (plain_wrapper.c:1080)
==21348== by 0x9A00BE: _php_stream_open_wrapper_ex (streams.c:2024)
==21348== by 0x66D75E: zif_ftp_nb_get (php_ftp.c:1042)
==21348== by 0xAAEA62: ZEND_DO_ICALL_SPEC_RETVAL_UNUSED_HANDLER (zend_vm_execute.h:573)
==21348== by 0xB3D1B4: execute_ex (zend_vm_execute.h:59734)
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=75452&edit=1