We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5c79841 commit 5955ce8Copy full SHA for 5955ce8
ext/zend_test/fiber.c
@@ -91,6 +91,7 @@ static ZEND_STACK_ALIGNED void zend_test_fiber_execute(zend_fiber_transfer *tran
91
execute_data = (zend_execute_data *) stack->top;
92
93
memset(execute_data, 0, sizeof(zend_execute_data));
94
+ execute_data->func = (zend_function *) &zend_pass_function;
95
96
EG(current_execute_data) = execute_data;
97
EG(jit_trace_num) = 0;
ext/zend_test/tests/gh16230.phpt
@@ -0,0 +1,22 @@
1
+--TEST--
2
+GH-16230: Segfault on debug_backtrace() inside _ZendTestFiber
3
+--EXTENSIONS--
4
+zend_test
5
+--FILE--
6
+<?php
7
+$test = new _ZendTestFiber(function (): void {
8
+ var_dump(debug_backtrace());
9
+});
10
+$test->start();
11
+?>
12
+--EXPECT--
13
+array(1) {
14
+ [0]=>
15
+ array(2) {
16
+ ["function"]=>
17
+ string(9) "{closure}"
18
+ ["args"]=>
19
+ array(0) {
20
+ }
21
22
+}
0 commit comments