Skip to content

Commit 6cf24cd

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
2 parents 272f7f7 + 2197a49 commit 6cf24cd

File tree

2 files changed

+11
-22
lines changed

2 files changed

+11
-22
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,10 @@ PHP NEWS
9393
. Fixed bug GH-18018 (RC1 data returned from offsetGet causes UAF in
9494
ArrayObject). (nielsdos)
9595

96+
- Standard:
97+
. Fixed bug GH-18145 (php8ts crashes in php_clear_stat_cache()).
98+
(Jakub Zelenka)
99+
96100
- Treewide:
97101
. Fixed bug GH-17736 (Assertion failure zend_reference_destroy()). (nielsdos)
98102

ext/standard/basic_functions.c

Lines changed: 7 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -215,31 +215,16 @@ static void php_putenv_destructor(zval *zv) /* {{{ */
215215

216216
static void basic_globals_ctor(php_basic_globals *basic_globals_p) /* {{{ */
217217
{
218-
BG(umask) = -1;
219-
BG(user_tick_functions) = NULL;
220-
BG(user_filter_map) = NULL;
221-
BG(serialize_lock) = 0;
222-
223-
memset(&BG(serialize), 0, sizeof(BG(serialize)));
224-
memset(&BG(unserialize), 0, sizeof(BG(unserialize)));
225-
226-
memset(&BG(url_adapt_session_ex), 0, sizeof(BG(url_adapt_session_ex)));
227-
memset(&BG(url_adapt_output_ex), 0, sizeof(BG(url_adapt_output_ex)));
218+
memset(basic_globals_p, 0, sizeof(php_basic_globals));
228219

229-
BG(url_adapt_session_ex).type = 1;
230-
BG(url_adapt_output_ex).type = 0;
220+
basic_globals_p->umask = -1;
221+
basic_globals_p->url_adapt_session_ex.type = 1;
231222

232-
zend_hash_init(&BG(url_adapt_session_hosts_ht), 0, NULL, NULL, 1);
233-
zend_hash_init(&BG(url_adapt_output_hosts_ht), 0, NULL, NULL, 1);
234-
235-
#if defined(_REENTRANT)
236-
memset(&BG(mblen_state), 0, sizeof(BG(mblen_state)));
237-
#endif
238-
239-
BG(page_uid) = -1;
240-
BG(page_gid) = -1;
223+
zend_hash_init(&basic_globals_p->url_adapt_session_hosts_ht, 0, NULL, NULL, 1);
224+
zend_hash_init(&basic_globals_p->url_adapt_output_hosts_ht, 0, NULL, NULL, 1);
241225

242-
BG(syslog_device) = NULL;
226+
basic_globals_p->page_uid = -1;
227+
basic_globals_p->page_gid = -1;
243228
}
244229
/* }}} */
245230

0 commit comments

Comments
 (0)