Skip to content

Commit e4adc67

Browse files
committed
Merge tag 'php-8.3.4' into was-8.3.x
Tag for php-8.3.4
2 parents 58f643e + 5cba2a3 commit e4adc67

File tree

79 files changed

+2245
-1644
lines changed

Some content is hidden

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

79 files changed

+2245
-1644
lines changed

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ 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
13+
continue-on-error: true

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ runs:
5555
--show-diff \
5656
--show-slow 1000 \
5757
--set-timeout 120
58-
- uses: actions/upload-artifact@v3
58+
- uses: actions/upload-artifact@v4
5959
if: always() && inputs.testArtifacts != null
6060
with:
6161
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
@@ -29,7 +29,7 @@ runs:
2929
--show-diff \
3030
--show-slow 1000 \
3131
--set-timeout 120
32-
- uses: actions/upload-artifact@v3
32+
- uses: actions/upload-artifact@v4
3333
if: always() && inputs.testArtifacts != null
3434
with:
3535
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
@@ -22,7 +22,7 @@ on:
2222
- master
2323
pull_request:
2424
paths-ignore:
25-
- docs/*
25+
- docs/**
2626
- NEWS
2727
- UPGRADING
2828
- UPGRADING.INTERNALS
@@ -31,8 +31,8 @@ on:
3131
- CODING_STANDARDS.md
3232
- .cirrus.yml
3333
- .travis.yml
34-
- travis/*
35-
- .circleci/*
34+
- travis/**
35+
- .circleci/**
3636
branches:
3737
- '**'
3838
permissions:

CODEOWNERS

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,12 +37,14 @@
3737
/Zend/zend.* @dstogov
3838
/Zend/zend_alloc.* @dstogov
3939
/Zend/zend_API.* @dstogov
40+
/Zend/zend_call_stack.* @arnaud-lb
4041
/Zend/zend_closures.* @dstogov
4142
/Zend/zend_execute.* @dstogov
4243
/Zend/zend_execute_API.c @dstogov
43-
/Zend/zend_gc.* @dstogov
44+
/Zend/zend_gc.* @dstogov @arnaud-lb
4445
/Zend/zend_hash.* @dstogov
4546
/Zend/zend_inheritance.* @dstogov
47+
/Zend/zend_max_execution_timer.* @arnaud-lb
4648
/Zend/zend_object_handlers.* @dstogov
4749
/Zend/zend_objects.* @dstogov
4850
/Zend/zend_objects_API.* @dstogov

NEWS

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,56 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3+
14 Mar 2024, PHP 8.3.4
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 unlikely memory leak in case of namespace removal with extremely deep
13+
trees. (nielsdos)
14+
. Fix reference access in dimensions for DOMNodeList and DOMNodeMap.
15+
(nielsdos)
16+
17+
- Fileinfo:
18+
. Fixed bug GH-13344 (finfo::buffer(): Failed identify data 0:(null),
19+
backport). (nielsdos)
20+
21+
- FPM:
22+
. Fixed bug #75712 (getenv in php-fpm should not read $_ENV, $_SERVER).
23+
(Jakub Zelenka)
24+
25+
- GD:
26+
. Fixed bug GH-12019 (detection of image formats in system gd library).
27+
(Michael Orlitzky)
28+
29+
- MySQLnd:
30+
. Fixed bug GH-11950 ([mysqlnd] Fixed not to set CR_MALFORMED_PACKET to error
31+
if CR_SERVER_GONE_ERROR is already set). (Saki Takamachi)
32+
33+
- PDO:
34+
. Fix various PDORow bugs. (Girgias)
35+
36+
- PGSQL:
37+
. Fixed bug GH-13354 (pg_execute/pg_send_query_params/pg_send_execute
38+
with null value passed by reference). (George Barbarosie)
39+
40+
- SPL:
41+
. Fixed bug GH-13531 (Unable to resize SplfixedArray after being unserialized
42+
in PHP 8.2.15). (nielsdos)
43+
44+
- Standard:
45+
. Fixed bug GH-13279 (Instable array during in-place modification in uksort).
46+
(ilutov)
47+
. Fixed array key as hash to string (case insensitive) comparison typo
48+
for the second operand buffer size (albeit unused for now). (A. Slepykh)
49+
50+
- XML:
51+
. Fixed bug GH-13517 (Multiple test failures when building with
52+
--with-expat). (nielsdos)
53+
354
15 Feb 2024, PHP 8.3.3
455

556
- Core:

Zend/zend.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1158,6 +1158,8 @@ void zend_shutdown(void) /* {{{ */
11581158
#endif
11591159
zend_destroy_rsrc_list_dtors();
11601160

1161+
zend_unload_modules();
1162+
11611163
zend_optimizer_shutdown();
11621164
startup_done = false;
11631165
}

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.3.3"
23+
#define ZEND_VERSION "4.3.4"
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

@@ -2367,6 +2368,7 @@ ZEND_API void zend_collect_module_handlers(void) /* {{{ */
23672368
int startup_count = 0;
23682369
int shutdown_count = 0;
23692370
int post_deactivate_count = 0;
2371+
int dl_loaded_count = 0;
23702372
zend_class_entry *ce;
23712373
int class_count = 0;
23722374

@@ -2381,6 +2383,9 @@ ZEND_API void zend_collect_module_handlers(void) /* {{{ */
23812383
if (module->post_deactivate_func) {
23822384
post_deactivate_count++;
23832385
}
2386+
if (module->handle) {
2387+
dl_loaded_count++;
2388+
}
23842389
} ZEND_HASH_FOREACH_END();
23852390
module_request_startup_handlers = (zend_module_entry**)realloc(
23862391
module_request_startup_handlers,
@@ -2393,6 +2398,9 @@ ZEND_API void zend_collect_module_handlers(void) /* {{{ */
23932398
module_request_shutdown_handlers[shutdown_count] = NULL;
23942399
module_post_deactivate_handlers = module_request_shutdown_handlers + shutdown_count + 1;
23952400
module_post_deactivate_handlers[post_deactivate_count] = NULL;
2401+
/* Cannot reuse module_request_startup_handlers because it is freed in zend_destroy_modules, which happens before zend_unload_modules. */
2402+
modules_dl_loaded = realloc(modules_dl_loaded, sizeof(zend_module_entry*) * (dl_loaded_count + 1));
2403+
modules_dl_loaded[dl_loaded_count] = NULL;
23962404
startup_count = 0;
23972405

23982406
ZEND_HASH_MAP_FOREACH_PTR(&module_registry, module) {
@@ -2405,6 +2413,9 @@ ZEND_API void zend_collect_module_handlers(void) /* {{{ */
24052413
if (module->post_deactivate_func) {
24062414
module_post_deactivate_handlers[--post_deactivate_count] = module;
24072415
}
2416+
if (module->handle) {
2417+
modules_dl_loaded[--dl_loaded_count] = module;
2418+
}
24082419
} ZEND_HASH_FOREACH_END();
24092420

24102421
/* Collect internal classes with static members */
@@ -3179,18 +3190,23 @@ void module_destructor(zend_module_entry *module) /* {{{ */
31793190
clean_module_functions(module);
31803191
}
31813192

3182-
#if HAVE_LIBDL
3183-
if (module->handle && !getenv("ZEND_DONT_UNLOAD_MODULES")) {
3184-
DL_UNLOAD(module->handle);
3185-
}
3186-
#endif
3187-
31883193
#if ZEND_RC_DEBUG
31893194
zend_rc_debug = orig_rc_debug;
31903195
#endif
31913196
}
31923197
/* }}} */
31933198

3199+
void module_registry_unload(const zend_module_entry *module)
3200+
{
3201+
#if HAVE_LIBDL
3202+
if (!getenv("ZEND_DONT_UNLOAD_MODULES")) {
3203+
DL_UNLOAD(module->handle);
3204+
}
3205+
#else
3206+
ZEND_IGNORE_VALUE(module);
3207+
#endif
3208+
}
3209+
31943210
ZEND_API void zend_activate_modules(void) /* {{{ */
31953211
{
31963212
zend_module_entry **p = module_request_startup_handlers;
@@ -3235,6 +3251,18 @@ ZEND_API void zend_deactivate_modules(void) /* {{{ */
32353251
}
32363252
/* }}} */
32373253

3254+
void zend_unload_modules(void) /* {{{ */
3255+
{
3256+
zend_module_entry **modules = modules_dl_loaded;
3257+
while (*modules) {
3258+
module_registry_unload(*modules);
3259+
modules++;
3260+
}
3261+
free(modules_dl_loaded);
3262+
modules_dl_loaded = NULL;
3263+
}
3264+
/* }}} */
3265+
32383266
ZEND_API void zend_post_deactivate_modules(void) /* {{{ */
32393267
{
32403268
if (EG(full_tables_cleanup)) {
@@ -3253,6 +3281,9 @@ ZEND_API void zend_post_deactivate_modules(void) /* {{{ */
32533281
break;
32543282
}
32553283
module_destructor(module);
3284+
if (module->handle) {
3285+
module_registry_unload(module);
3286+
}
32563287
zend_string_release_ex(key, 0);
32573288
} ZEND_HASH_MAP_FOREACH_END_DEL();
32583289
} 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

0 commit comments

Comments
 (0)