Skip to content

Commit

Permalink
Merge branch 'PHP-8.2' into PHP-8.3
Browse files Browse the repository at this point in the history
* PHP-8.2:
  Fix GH-15208: Segfault with breakpoint map and phpdbg_clear()
  • Loading branch information
nielsdos committed Nov 26, 2024
2 parents 21df4a9 + 97b0318 commit 3c3ec0e
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 0 deletions.
4 changes: 4 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ PHP NEWS
. Fixed bug GH-16695 (phar:// tar parser and zero-length file header blocks).
(nielsdos, Hans Krentel)

- PHPDBG:
. Fixed bug GH-15208 (Segfault with breakpoint map and phpdbg_clear()).
(nielsdos)

- SimpleXML:
. Fixed bug GH-16808 (Segmentation fault in RecursiveIteratorIterator
->current() with a xml element input). (nielsdos)
Expand Down
1 change: 1 addition & 0 deletions sapi/phpdbg/phpdbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ PHP_FUNCTION(phpdbg_clear)
zend_hash_clean(&PHPDBG_G(bp)[PHPDBG_BREAK_FILE_OPLINE]);
zend_hash_clean(&PHPDBG_G(bp)[PHPDBG_BREAK_OPLINE]);
zend_hash_clean(&PHPDBG_G(bp)[PHPDBG_BREAK_METHOD]);
zend_hash_clean(&PHPDBG_G(bp)[PHPDBG_BREAK_MAP]);
zend_hash_clean(&PHPDBG_G(bp)[PHPDBG_BREAK_COND]);
} /* }}} */

Expand Down
15 changes: 15 additions & 0 deletions sapi/phpdbg/tests/gh15208.phpt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
--TEST--
GH-15208 (Segfault with breakpoint map and phpdbg_clear())
--PHPDBG--
r
q
--FILE--
<?php
phpdbg_break_method("foo", "bar");
phpdbg_clear();
?>
--EXPECTF--
[Successful compilation of %s]
prompt> [Breakpoint #0 added at foo::bar]
[Script ended normally]
prompt>

0 comments on commit 3c3ec0e

Please sign in to comment.