Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 4c95cb3

Browse files
committed
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2: Fix GH-14741: Segmentation fault in Zend/zend_types.h
2 parents 192c102 + eb8c3cb commit 4c95cb3

File tree

3 files changed

+19
-0
lines changed

3 files changed

+19
-0
lines changed

‎NEWS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ PHP NEWS
99
. Fixed bug GH-14590 (Memory leak in FPM test gh13563-conf-bool-env.phpt.
1010
(nielsdos)
1111
. Fixed OSS-Fuzz #69765. (nielsdos)
12+
. Fixed bug GH-14741 (Segmentation fault in Zend/zend_types.h). (nielsdos)
1213

1314
- Dom:
1415
. Fixed bug GH-14702 (DOMDocument::xinclude() crash). (nielsdos)

‎Zend/zend_interfaces.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,7 @@ ZEND_API void zend_register_interfaces(void)
667667

668668
memcpy(&zend_internal_iterator_handlers, zend_get_std_object_handlers(),
669669
sizeof(zend_object_handlers));
670+
zend_internal_iterator_handlers.clone_obj = NULL;
670671
zend_internal_iterator_handlers.free_obj = zend_internal_iterator_free;
671672
}
672673
/* }}} */

‎ext/zend_test/tests/gh14741.phpt‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
--TEST--
2+
GH-14741 (Segmentation fault in Zend/zend_types.h)
3+
--EXTENSIONS--
4+
zend_test
5+
--FILE--
6+
<?php
7+
$subject = new \ZendTest\Iterators\TraversableTest();
8+
$it = $subject->getIterator();
9+
try {
10+
clone $it;
11+
} catch (Error $e) {
12+
echo $e->getMessage(), "\n";
13+
}
14+
?>
15+
--EXPECT--
16+
Trying to clone an uncloneable object of class InternalIterator
17+
TraversableTest::drop

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /