Skip to content

Commit 9ed81bd

Browse files
committed
Merge tag 'php-8.3.12' into was-8.3.x
Tag for php-8.3.12
2 parents 1c8a06d + b4ecd9a commit 9ed81bd

Some content is hidden

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

75 files changed

+6336
-4656
lines changed

.github/actions/build-libmysqlclient/action.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ runs:
1515
set -x
1616
LIBMYSQL=${{ inputs.libmysql }}
1717
MYSQL_BASE=${LIBMYSQL%%-linux-*}
18-
MYSQL_VERSION=${MYSQL_BASE#*-}
1918
MYSQL_DIR=$HOME/$MYSQL_BASE
2019
mkdir -p $MYSQL_DIR
21-
URL=https://cdn.mysql.com/Downloads/MySQL-${MYSQL_VERSION%.*}/$LIBMYSQL
20+
URL=https://downloads.mysql.com/archives/get/p/23/file/$LIBMYSQL
2221
wget -nv $URL
2322
tar -xf $LIBMYSQL --strip-components=1 -C $MYSQL_DIR
2423
PDO_MYSQL=${MYSQL_DIR}

NEWS

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,65 @@
11
PHP NEWS
22
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3+
26 Sep 2024, PHP 8.3.12
4+
5+
- CGI:
6+
. Fixed bug GHSA-p99j-rfp4-xqvq (Bypass of CVE-2024-4577, Parameter Injection
7+
Vulnerability). (CVE-2024-8926) (nielsdos)
8+
. Fixed bug GHSA-94p6-54jq-9mwp (cgi.force_redirect configuration is
9+
bypassable due to the environment variable collision). (CVE-2024-8927)
10+
(nielsdos)
11+
12+
- Core:
13+
. Fixed bug GH-15408 (MSan false-positve on zend_max_execution_timer).
14+
(zeriyoshi)
15+
. Fixed bug GH-15515 (Configure error grep illegal option q). (Peter Kokot)
16+
. Fixed bug GH-15514 (Configure error: genif.sh: syntax error). (Peter Kokot)
17+
. Fixed bug GH-15565 (--disable-ipv6 during compilation produces error
18+
EAI_SYSTEM not found). (nielsdos)
19+
. Fixed bug GH-15587 (CRC32 API build error on arm 32-bit).
20+
(Bernd Kuhls, Thomas Petazzoni)
21+
. Fixed bug GH-15330 (Do not scan generator frames more than once). (Arnaud)
22+
. Fixed uninitialized lineno in constant AST of internal enums. (ilutov)
23+
24+
- Curl:
25+
. FIxed bug GH-15547 (curl_multi_select overflow on timeout argument).
26+
(David Carlier)
27+
28+
- DOM:
29+
. Fixed bug GH-15551 (Segmentation fault (access null pointer) in
30+
ext/dom/xml_common.h). (nielsdos)
31+
. Fixed bug GH-15654 (Signed integer overflow in ext/dom/nodelist.c).
32+
(nielsdos)
33+
34+
- Fileinfo:
35+
. Fixed bug GH-15752 (Incorrect error message for finfo_file
36+
with an empty filename argument). (DanielEScherzer)
37+
38+
- FPM:
39+
. Fixed bug GHSA-865w-9rf3-2wh5 (Logs from childrens may be altered).
40+
(CVE-2024-9026) (Jakub Zelenka)
41+
42+
- MySQLnd:
43+
. Fixed bug GH-15432 (Heap corruption when querying a vector). (cmb,
44+
Kamil Tekiela)
45+
46+
- Opcache:
47+
. Fixed bug GH-15661 (Access null pointer in
48+
Zend/Optimizer/zend_inference.c). (nielsdos)
49+
. Fixed bug GH-15658 (Segmentation fault in Zend/zend_vm_execute.h).
50+
(nielsdos)
51+
52+
- SAPI:
53+
. Fixed bug GHSA-9pqp-7h25-4f32 (Erroneous parsing of multipart form data).
54+
(CVE-2024-8925) (Arnaud)
55+
56+
- Standard:
57+
. Fixed bug GH-15552 (Signed integer overflow in ext/standard/scanf.c). (cmb)
58+
59+
- Streams:
60+
. Fixed bug GH-15628 (php_stream_memory_get_buffer() not zero-terminated).
61+
(cmb)
62+
363
29 Aug 2024, PHP 8.3.11
464

565
- Core:
@@ -51,6 +111,10 @@ PHP NEWS
51111
(zend_hash_num_elements() Zend/zend_hash.h)). (nielsdos)
52112
. Fixed bug GH-15210 use-after-free on watchpoint allocations. (nielsdos)
53113

114+
- Random:
115+
. Fixed part of bug GH-15381, checking getrandom availability on solaris.
116+
(David Carlier)
117+
54118
- Soap:
55119
. Fixed bug #55639 (Digest autentication dont work). (nielsdos)
56120
. Fix SoapFault property destruction. (nielsdos)
@@ -60,6 +124,7 @@ PHP NEWS
60124
- Standard:
61125
. Fix passing non-finite timeout values in stream functions. (nielsdos)
62126
. Fixed GH-14780 p(f)sockopen timeout overflow. (David Carlier)
127+
. Fixed GH-15653 overflow on fgetcsv length parameter. (David Carlier)
63128

64129
- Streams:
65130
. Fixed bug GH-15028 (Memory leak in ext/phar/stream.c). (nielsdos)

UPGRADING

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ PHP 8.3 UPGRADE NOTES
395395
overloaded constructor of DatePeriod.
396396

397397
- DOM:
398-
. Added DOMNode::contains() and DOMNameSpaceNode::contains().
398+
. Added DOMNode::contains().
399399
. Added DOMElement::getAttributeNames().
400400
. Added DOMNode::getRootNode(). The $options argument does nothing at the
401401
moment because it only influences the shadow DOM, which we do not support

Zend/Optimizer/zend_inference.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4916,7 +4916,7 @@ ZEND_API bool zend_may_throw_ex(const zend_op *opline, const zend_ssa_op *ssa_op
49164916
return 0;
49174917
case ZEND_BIND_GLOBAL:
49184918
if ((opline+1)->opcode == ZEND_BIND_GLOBAL) {
4919-
return zend_may_throw(opline + 1, ssa_op + 1, op_array, ssa);
4919+
return zend_may_throw(opline + 1, ssa_op ? ssa_op + 1 : NULL, op_array, ssa);
49204920
}
49214921
return 0;
49224922
case ZEND_ADD:

Zend/tests/gh15330-001.phpt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
--TEST--
2+
GH-15330 001: Do not scan generator frames more than once
3+
--FILE--
4+
<?php
5+
6+
class It implements \IteratorAggregate
7+
{
8+
public function getIterator(): \Generator
9+
{
10+
yield 'foo';
11+
Fiber::suspend();
12+
var_dump("not executed");
13+
}
14+
}
15+
16+
function f() {
17+
var_dump(yield from new It());
18+
}
19+
20+
$iterable = f();
21+
22+
$fiber = new Fiber(function () use ($iterable) {
23+
var_dump($iterable->current());
24+
$iterable->next();
25+
var_dump("not executed");
26+
});
27+
28+
$ref = $fiber;
29+
30+
$fiber->start();
31+
32+
gc_collect_cycles();
33+
34+
?>
35+
==DONE==
36+
--EXPECT--
37+
string(3) "foo"
38+
==DONE==

Zend/tests/gh15330-002.phpt

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
--TEST--
2+
GH-15330 002: Do not scan generator frames more than once
3+
--FILE--
4+
<?php
5+
6+
function g() {
7+
yield 'foo';
8+
Fiber::suspend();
9+
}
10+
11+
function f() {
12+
var_dump(yield from g());
13+
}
14+
15+
$iterable = f();
16+
17+
$fiber = new Fiber(function () use ($iterable) {
18+
var_dump($iterable->current());
19+
$iterable->next();
20+
var_dump("not executed");
21+
});
22+
23+
$ref = $fiber;
24+
25+
$fiber->start();
26+
27+
gc_collect_cycles();
28+
29+
?>
30+
==DONE==
31+
--EXPECT--
32+
string(3) "foo"
33+
==DONE==

Zend/tests/gh15330-003.phpt

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
--TEST--
2+
GH-15330 003: Do not scan generator frames more than once
3+
--FILE--
4+
<?php
5+
6+
class It implements \IteratorAggregate
7+
{
8+
public function getIterator(): \Generator
9+
{
10+
yield 'foo';
11+
Fiber::suspend();
12+
var_dump("not executed");
13+
}
14+
}
15+
16+
class Canary {
17+
public function __construct(public mixed $value) {}
18+
public function __destruct() {
19+
var_dump(__METHOD__);
20+
}
21+
}
22+
23+
function f($canary) {
24+
var_dump(yield from new It());
25+
}
26+
27+
$canary = new Canary(null);
28+
29+
$iterable = f($canary);
30+
31+
$fiber = new Fiber(function () use ($iterable, $canary) {
32+
var_dump($canary, $iterable->current());
33+
$iterable->next();
34+
var_dump("not executed");
35+
});
36+
37+
$canary->value = $fiber;
38+
39+
$fiber->start();
40+
41+
$iterable->current();
42+
43+
$fiber = $iterable = $canary = null;
44+
45+
gc_collect_cycles();
46+
47+
?>
48+
==DONE==
49+
--EXPECTF--
50+
object(Canary)#%d (1) {
51+
["value"]=>
52+
object(Fiber)#%d (0) {
53+
}
54+
}
55+
string(3) "foo"
56+
string(18) "Canary::__destruct"
57+
==DONE==

Zend/tests/gh15330-004.phpt

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
--TEST--
2+
GH-15330 004: Do not scan generator frames more than once
3+
--FILE--
4+
<?php
5+
6+
class Canary {
7+
public function __construct(public mixed $value) {}
8+
public function __destruct() {
9+
var_dump(__METHOD__);
10+
}
11+
}
12+
13+
function g() {
14+
yield 'foo';
15+
Fiber::suspend();
16+
}
17+
18+
function f($canary) {
19+
var_dump(yield from g());
20+
}
21+
22+
$canary = new Canary(null);
23+
24+
$iterable = f($canary);
25+
26+
$fiber = new Fiber(function () use ($iterable, $canary) {
27+
var_dump($canary, $iterable->current());
28+
$iterable->next();
29+
var_dump("not executed");
30+
});
31+
32+
$canary->value = $fiber;
33+
34+
$fiber->start();
35+
36+
$iterable->current();
37+
38+
$fiber = $iterable = $canary = null;
39+
40+
gc_collect_cycles();
41+
42+
?>
43+
==DONE==
44+
--EXPECTF--
45+
object(Canary)#%d (1) {
46+
["value"]=>
47+
object(Fiber)#%d (0) {
48+
}
49+
}
50+
string(3) "foo"
51+
string(18) "Canary::__destruct"
52+
==DONE==

Zend/tests/gh15330-005.phpt

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
--TEST--
2+
GH-15330 005: Do not scan generator frames more than once
3+
--FILE--
4+
<?php
5+
6+
class Canary {
7+
public function __construct(public mixed $value) {}
8+
public function __destruct() {
9+
var_dump(__METHOD__);
10+
}
11+
}
12+
13+
function g() {
14+
yield 'foo';
15+
Fiber::suspend();
16+
}
17+
18+
function f($canary) {
19+
var_dump(yield from g());
20+
}
21+
22+
$canary = new Canary(null);
23+
24+
$iterable = f($canary);
25+
26+
$fiber = new Fiber(function () use ($iterable, $canary) {
27+
var_dump($canary, $iterable->current());
28+
$f = $iterable->next(...);
29+
$f();
30+
var_dump("not executed");
31+
});
32+
33+
$canary->value = $fiber;
34+
35+
$fiber->start();
36+
37+
$iterable->current();
38+
39+
$fiber = $iterable = $canary = null;
40+
41+
gc_collect_cycles();
42+
43+
?>
44+
==DONE==
45+
--EXPECTF--
46+
object(Canary)#%d (1) {
47+
["value"]=>
48+
object(Fiber)#%d (0) {
49+
}
50+
}
51+
string(3) "foo"
52+
string(18) "Canary::__destruct"
53+
==DONE==

0 commit comments

Comments
 (0)