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 tests: Prevent stack overflow during dtor
  • Loading branch information
arnaud-lb committed Oct 24, 2024
2 parents 551a9ef + 4c212b3 commit c5a5707
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ext/json/tests/gh15168.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ var_dump(json_encode($firstNode, depth: 500000));
var_dump(json_last_error());
var_dump(json_last_error_msg());

while ($next = $firstNode->next) {
$firstNode->next = $next->next;
}

?>
--EXPECT--
bool(false)
Expand Down
5 changes: 5 additions & 0 deletions ext/standard/tests/serialize/gh15169.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ try {
} catch (Error $e) {
echo $e->getMessage(), "\n";
}

while ($next = $firstNode->next) {
$firstNode->next = $next->next;
}

?>
--EXPECTF--
Maximum call stack size of %d bytes (zend.max_allowed_stack_size - zend.reserved_stack_size) reached. Infinite recursion?

0 comments on commit c5a5707

Please sign in to comment.