Skip to content

Commit 5ff67f8

Browse files
committed
Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3: Fix phpGH-15208: Segfault with breakpoint map and phpdbg_clear()
2 parents 0d8c5ad + 3c3ec0e commit 5ff67f8

File tree

3 files changed

+20
-0
lines changed

3 files changed

+20
-0
lines changed

NEWS

+4
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ PHP NEWS
2525
. Fixed bug GH-16879 (JIT dead code skipping does not update call_level).
2626
(nielsdos)
2727

28+
- PHPDBG:
29+
. Fixed bug GH-15208 (Segfault with breakpoint map and phpdbg_clear()).
30+
(nielsdos)
31+
2832
- Windows:
2933
. Fixed bug GH-16849 (Error dialog causes process to hang). (cmb)
3034
. Windows Server 2025 is now properly reported. (cmb)

sapi/phpdbg/phpdbg.c

+1
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,7 @@ PHP_FUNCTION(phpdbg_clear)
370370
zend_hash_clean(&PHPDBG_G(bp)[PHPDBG_BREAK_FILE_OPLINE]);
371371
zend_hash_clean(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE]);
372372
zend_hash_clean(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD]);
373+
zend_hash_clean(&PHPDBG_G(bp)[PHPDBG_BREAK_MAP]);
373374
zend_hash_clean(&PHPDBG_G(bp)[PHPDBG_BREAK_COND]);
374375
} /* }}} */
375376

sapi/phpdbg/tests/gh15208.phpt

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
--TEST--
2+
GH-15208 (Segfault with breakpoint map and phpdbg_clear())
3+
--PHPDBG--
4+
r
5+
q
6+
--FILE--
7+
<?php
8+
phpdbg_break_method("foo", "bar");
9+
phpdbg_clear();
10+
?>
11+
--EXPECTF--
12+
[Successful compilation of %s]
13+
prompt> [Breakpoint #0 added at foo::bar]
14+
[Script ended normally]
15+
prompt>

0 commit comments

Comments
 (0)