Skip to content

Commit

Permalink
Merge branch 'PHP-8.4'
Browse files Browse the repository at this point in the history
* PHP-8.4:
  Fix phpGH-15208: Segfault with breakpoint map and phpdbg_clear()
  • Loading branch information
nielsdos committed Nov 26, 2024
2 parents 408f5f8 + 5ff67f8 commit c2a6a7d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions sapi/phpdbg/phpdbg.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,6 +370,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 c2a6a7d

Please sign in to comment.