com php-src: Ref #76801 remove old file source from file_sources hash in case of file included more than once: sapi/phpdbg/phpdbg_list.c
| From: | Matteo Beccati | Date: | Wed, 03 Apr 2019 12:35:57 +0000 |
| Subject: | com php-src: Ref #76801 remove old file source from file_sources hash in case of file included more than once: sapi/phpdbg/phpdbg_list.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-105513@lists.php.net to get a copy of this message | ||
Commit: 4029c0b6a2908096b9dd49797260daafdae5558d
Author: Alessandro Chitolina <alekitto@gmail.com> Tue, 2 Apr 2019 14:36:59 +0200
Committer: Matteo Beccati <mbeccati@php.net> Wed, 3 Apr 2019 14:35:57 +0200
Parents: 56a5d0bd9179972d0675f8f772fc5423d9de00d0
Branches: PHP-7.2 PHP-7.3 PHP-7.4 master
Link: http://git.php.net/?p=php-src..git;a=commitdiff;h=4029c0b6a2908096b9dd49797260daafdae5558d
Log:
Ref #76801 remove old file source from file_sources hash in case of file included more than once
Bugs:
https://bugs.php.net/76801
Changed paths:
M sapi/phpdbg/phpdbg_list.c
Diff:
diff --git a/sapi/phpdbg/phpdbg_list.c b/sapi/phpdbg/phpdbg_list.c
index cb0250e..15d1313 100644
--- a/sapi/phpdbg/phpdbg_list.c
+++ b/sapi/phpdbg/phpdbg_list.c
@@ -273,6 +273,7 @@ zend_op_array *phpdbg_compile_file(zend_file_handle *file, int type) {
dataptr = erealloc(dataptr, sizeof(phpdbg_file_source) + sizeof(uint32_t) * line);
dataptr->line[line] = endptr - data.buf;
+ zend_hash_del(&PHPDBG_G(file_sources), ret->filename);
zend_hash_add_ptr(&PHPDBG_G(file_sources), ret->filename, dataptr);
phpdbg_resolve_pending_file_break(ZSTR_VAL(ret->filename));