[php-src] PHP-8.5: Fix GH-24321: reset global_map_ptr_last on shutdown.
| From: | David Carlier | Date: | Fri, 16 Oct 2026 15:27:53 +0000 |
| Subject: | [php-src] PHP-8.5: Fix GH-24321: reset global_map_ptr_last on shutdown. | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-142353@lists.php.net to get a copy of this message | ||
Author: David Carlier (devnexen)
Date: 2026-10-16T16:27:20+01:00
Commit: https://github.com/php/php-src/commit/171f81f4a48b338ad46b5b13bc36c043bb3a3543
Raw diff: https://github.com/php/php-src/commit/171f81f4a48b338ad46b5b13bc36c043bb3a3543.diff
Fix GH-24321: reset global_map_ptr_last on shutdown.
Close GH-24359
Changed paths:
M NEWS
M Zend/zend.c
Diff:
diff --git a/NEWS b/NEWS
index 1e49099b1718..1d855a4b1ec4 100644
--- a/NEWS
+++ b/NEWS
@@ -23,6 +23,9 @@ PHP NEWS
. Fix memory leak for nested HTTP calls. (EdmondDantes)
. Fixed pthread attribute leak in zend_call_stack_get_netbsd_pthread().
(David Carlier)
+ . Fixed bug GH-24321 (ZTS: global_map_ptr_last survives zend_shutdown(),
+ so an in-process engine restart keeps growing the map_ptr table).
+ (David Carlier)
- Date:
. Fixed bug GH-20503 (Assertion failure with ext/date DateInterval property
diff --git a/Zend/zend.c b/Zend/zend.c
index 8fea4e57e5e6..da78dc0c2e8c 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -1219,6 +1219,7 @@ void zend_shutdown(void) /* {{{ */
#endif
zend_map_ptr_static_last = 0;
zend_map_ptr_static_size = 0;
+ global_map_ptr_last = 0;
zend_destroy_rsrc_list_dtors();