Skip to content

Commit 6111a93

Browse files
committed
Merge tag 'php-8.2.17' into was-8.2.x
Tag for php-8.2.17
2 parents 064a278 + 4e80788 commit 6111a93

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1630
-1242
lines changed

.github/actions/setup-caddy/action.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ runs:
33
using: composite
44
steps:
55
- shell: bash
6+
env:
7+
GH_TOKEN: ${{ github.token }}
68
run: |
79
set -x
8-
sudo curl 'https://caddyserver.com/api/download?os=linux&arch=amd64' -o /usr/bin/caddy
10+
gh release -R caddyserver/caddy download --pattern 'caddy_*_linux_amd64.tar.gz' -O - | sudo tar -xz -C /usr/bin caddy
911
sudo chmod +x /usr/bin/caddy
1012
sudo caddy start --config ext/curl/tests/Caddyfile

.github/actions/test-linux/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ runs:
4646
--show-diff \
4747
--show-slow 1000 \
4848
--set-timeout 120
49-
- uses: actions/upload-artifact@v3
49+
- uses: actions/upload-artifact@v4
5050
if: always() && inputs.testArtifacts != null
5151
with:
5252
name: ${{ github.job }}_${{ inputs.testArtifacts }}

.github/actions/test-macos/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ runs:
2828
--show-diff \
2929
--show-slow 1000 \
3030
--set-timeout 120
31-
- uses: actions/upload-artifact@v3
31+
- uses: actions/upload-artifact@v4
3232
if: always() && inputs.testArtifacts != null
3333
with:
3434
name: ${{ github.job }}_${{ inputs.testArtifacts }}

.github/workflows/push.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Push
22
on:
33
push:
44
paths-ignore:
5-
- docs/*
5+
- docs/**
66
- NEWS
77
- UPGRADING
88
- UPGRADING.INTERNALS
@@ -11,8 +11,8 @@ on:
1111
- CODING_STANDARDS.md
1212
- .cirrus.yml
1313
- .travis.yml
14-
- travis/*
15-
- .circleci/*
14+
- travis/**
15+
- .circleci/**
1616
branches:
1717
- PHP-7.4
1818
- PHP-8.0
@@ -21,7 +21,7 @@ on:
2121
- master
2222
pull_request:
2323
paths-ignore:
24-
- docs/*
24+
- docs/**
2525
- NEWS
2626
- UPGRADING
2727
- UPGRADING.INTERNALS
@@ -30,8 +30,8 @@ on:
3030
- CODING_STANDARDS.md
3131
- .cirrus.yml
3232
- .travis.yml
33-
- travis/*
34-
- .circleci/*
33+
- travis/**
34+
- .circleci/**
3535
branches:
3636
- '**'
3737
concurrency:

NEWS

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,41 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3+
14 Mar 2024, PHP 8.2.17
4+
5+
- Core:
6+
. Fix ZTS persistent resource crashes on shutdown. (nielsdos)
7+
8+
- Curl:
9+
. Fix failing tests due to string changes in libcurl 8.6.0. (Ayesh)
10+
11+
- DOM:
12+
. Fix reference access in dimensions for DOMNodeList and DOMNodeMap.
13+
(nielsdos)
14+
15+
- Fileinfo:
16+
. Fixed bug GH-13344 (finfo::buffer(): Failed identify data 0:(null),
17+
backport). (nielsdos)
18+
19+
- FPM:
20+
. Fixed bug #75712 (getenv in php-fpm should not read $_ENV, $_SERVER).
21+
(Jakub Zelenka)
22+
23+
- GD:
24+
. Fixed bug GH-12019 (detection of image formats in system gd library).
25+
(Michael Orlitzky)
26+
27+
- MySQLnd:
28+
. Fixed bug GH-11950 ([mysqlnd] Fixed not to set CR_MALFORMED_PACKET to error
29+
if CR_SERVER_GONE_ERROR is already set). (Saki Takamachi)
30+
31+
- PGSQL:
32+
. Fixed bug GH-13354 (pg_execute/pg_send_query_params/pg_send_execute
33+
with null value passed by reference). (George Barbarosie)
34+
35+
- Standard:
36+
. Fixed array key as hash to string (case insensitive) comparison typo
37+
for the second operand buffer size (albeit unused for now). (A. Slepykh)
38+
339
15 Feb 2024, PHP 8.2.16
440

541
- Core:

Zend/zend.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1130,6 +1130,8 @@ void zend_shutdown(void) /* {{{ */
11301130
#endif
11311131
zend_destroy_rsrc_list_dtors();
11321132

1133+
zend_unload_modules();
1134+
11331135
zend_optimizer_shutdown();
11341136
startup_done = false;
11351137
}

Zend/zend.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#ifndef ZEND_H
2121
#define ZEND_H
2222

23-
#define ZEND_VERSION "4.2.16"
23+
#define ZEND_VERSION "4.2.17"
2424

2525
#define ZEND_ENGINE_3
2626

@@ -129,6 +129,7 @@ void zend_shutdown(void);
129129
void zend_register_standard_ini_entries(void);
130130
zend_result zend_post_startup(void);
131131
void zend_set_utility_values(zend_utility_values *utility_values);
132+
void zend_unload_modules(void);
132133

133134
ZEND_API ZEND_COLD ZEND_NORETURN void _zend_bailout(const char *filename, uint32_t lineno);
134135
ZEND_API size_t zend_get_page_size(void);

Zend/zend_API.c

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ ZEND_API HashTable module_registry;
4040
static zend_module_entry **module_request_startup_handlers;
4141
static zend_module_entry **module_request_shutdown_handlers;
4242
static zend_module_entry **module_post_deactivate_handlers;
43+
static zend_module_entry **modules_dl_loaded;
4344

4445
static zend_class_entry **class_cleanup_handlers;
4546

@@ -2291,6 +2292,7 @@ ZEND_API void zend_collect_module_handlers(void) /* {{{ */
22912292
int startup_count = 0;
22922293
int shutdown_count = 0;
22932294
int post_deactivate_count = 0;
2295+
int dl_loaded_count = 0;
22942296
zend_class_entry *ce;
22952297
int class_count = 0;
22962298

@@ -2305,6 +2307,9 @@ ZEND_API void zend_collect_module_handlers(void) /* {{{ */
23052307
if (module->post_deactivate_func) {
23062308
post_deactivate_count++;
23072309
}
2310+
if (module->handle) {
2311+
dl_loaded_count++;
2312+
}
23082313
} ZEND_HASH_FOREACH_END();
23092314
module_request_startup_handlers = (zend_module_entry**)realloc(
23102315
module_request_startup_handlers,
@@ -2317,6 +2322,9 @@ ZEND_API void zend_collect_module_handlers(void) /* {{{ */
23172322
module_request_shutdown_handlers[shutdown_count] = NULL;
23182323
module_post_deactivate_handlers = module_request_shutdown_handlers + shutdown_count + 1;
23192324
module_post_deactivate_handlers[post_deactivate_count] = NULL;
2325+
/* Cannot reuse module_request_startup_handlers because it is freed in zend_destroy_modules, which happens before zend_unload_modules. */
2326+
modules_dl_loaded = realloc(modules_dl_loaded, sizeof(zend_module_entry*) * (dl_loaded_count + 1));
2327+
modules_dl_loaded[dl_loaded_count] = NULL;
23202328
startup_count = 0;
23212329

23222330
ZEND_HASH_MAP_FOREACH_PTR(&module_registry, module) {
@@ -2329,6 +2337,9 @@ ZEND_API void zend_collect_module_handlers(void) /* {{{ */
23292337
if (module->post_deactivate_func) {
23302338
module_post_deactivate_handlers[--post_deactivate_count] = module;
23312339
}
2340+
if (module->handle) {
2341+
modules_dl_loaded[--dl_loaded_count] = module;
2342+
}
23322343
} ZEND_HASH_FOREACH_END();
23332344

23342345
/* Collect internal classes with static members */
@@ -3072,18 +3083,23 @@ void module_destructor(zend_module_entry *module) /* {{{ */
30723083
clean_module_functions(module);
30733084
}
30743085

3075-
#if HAVE_LIBDL
3076-
if (module->handle && !getenv("ZEND_DONT_UNLOAD_MODULES")) {
3077-
DL_UNLOAD(module->handle);
3078-
}
3079-
#endif
3080-
30813086
#if ZEND_RC_DEBUG
30823087
zend_rc_debug = orig_rc_debug;
30833088
#endif
30843089
}
30853090
/* }}} */
30863091

3092+
void module_registry_unload(const zend_module_entry *module)
3093+
{
3094+
#if HAVE_LIBDL
3095+
if (!getenv("ZEND_DONT_UNLOAD_MODULES")) {
3096+
DL_UNLOAD(module->handle);
3097+
}
3098+
#else
3099+
ZEND_IGNORE_VALUE(module);
3100+
#endif
3101+
}
3102+
30873103
ZEND_API void zend_activate_modules(void) /* {{{ */
30883104
{
30893105
zend_module_entry **p = module_request_startup_handlers;
@@ -3128,6 +3144,18 @@ ZEND_API void zend_deactivate_modules(void) /* {{{ */
31283144
}
31293145
/* }}} */
31303146

3147+
void zend_unload_modules(void) /* {{{ */
3148+
{
3149+
zend_module_entry **modules = modules_dl_loaded;
3150+
while (*modules) {
3151+
module_registry_unload(*modules);
3152+
modules++;
3153+
}
3154+
free(modules_dl_loaded);
3155+
modules_dl_loaded = NULL;
3156+
}
3157+
/* }}} */
3158+
31313159
ZEND_API void zend_post_deactivate_modules(void) /* {{{ */
31323160
{
31333161
if (EG(full_tables_cleanup)) {
@@ -3146,6 +3174,9 @@ ZEND_API void zend_post_deactivate_modules(void) /* {{{ */
31463174
break;
31473175
}
31483176
module_destructor(module);
3177+
if (module->handle) {
3178+
module_registry_unload(module);
3179+
}
31493180
zend_string_release_ex(key, 0);
31503181
} ZEND_HASH_MAP_FOREACH_END_DEL();
31513182
} else {

Zend/zend_modules.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ extern ZEND_API HashTable module_registry;
125125

126126
void module_destructor(zend_module_entry *module);
127127
int module_registry_request_startup(zend_module_entry *module);
128-
int module_registry_unload_temp(const zend_module_entry *module);
128+
void module_registry_unload(const zend_module_entry *module);
129129
END_EXTERN_C()
130130

131131
#endif

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ dnl Basic autoconf initialization, generation of config.nice.
2020
dnl ----------------------------------------------------------------------------
2121

2222
AC_PREREQ([2.68])
23-
AC_INIT([PHP],[8.2.16],[https://github.com/php/php-src/issues],[php],[https://www.php.net])
23+
AC_INIT([PHP],[8.2.17],[https://github.com/php/php-src/issues],[php],[https://www.php.net])
2424
AC_CONFIG_SRCDIR([main/php_version.h])
2525
AC_CONFIG_AUX_DIR([build])
2626
AC_PRESERVE_HELP_ORDER

0 commit comments

Comments
 (0)