mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Merge branch 'PHP-8.4'
* PHP-8.4: Fix segfault on debug_backtrace() in _ZendTestFiber
This commit is contained in:
commit
b55b957adf
2 changed files with 23 additions and 0 deletions
|
@ -91,6 +91,7 @@ static ZEND_STACK_ALIGNED void zend_test_fiber_execute(zend_fiber_transfer *tran
|
|||
execute_data = (zend_execute_data *) stack->top;
|
||||
|
||||
memset(execute_data, 0, sizeof(zend_execute_data));
|
||||
execute_data->func = (zend_function *) &zend_pass_function;
|
||||
|
||||
EG(current_execute_data) = execute_data;
|
||||
EG(jit_trace_num) = 0;
|
||||
|
|
22
ext/zend_test/tests/gh16230.phpt
Normal file
22
ext/zend_test/tests/gh16230.phpt
Normal file
|
@ -0,0 +1,22 @@
|
|||
--TEST--
|
||||
GH-16230: Segfault on debug_backtrace() inside _ZendTestFiber
|
||||
--EXTENSIONS--
|
||||
zend_test
|
||||
--FILE--
|
||||
<?php
|
||||
$test = new _ZendTestFiber(function (): void {
|
||||
var_dump(debug_backtrace());
|
||||
});
|
||||
$test->start();
|
||||
?>
|
||||
--EXPECT--
|
||||
array(1) {
|
||||
[0]=>
|
||||
array(2) {
|
||||
["function"]=>
|
||||
string(9) "{closure}"
|
||||
["args"]=>
|
||||
array(0) {
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue