File tree 3 files changed +21
-0
lines changed 3 files changed +21
-0
lines changed Original file line number Diff line number Diff line change 8
8
. Fixed overflow check in OnUpdateMemoryConsumption. (nielsdos)
9
9
. Fixed bug GH-9916 (Entering shutdown sequence with a fiber suspended in a
10
10
Generator emits an unavoidable fatal error or crashes). (Arnaud)
11
+ . Fixed bug GH-10437 (Segfault/assertion when using fibers in shutdown
12
+ function after bailout). (trowski)
11
13
12
14
- FFI:
13
15
. Fixed incorrect bitshifting and masking in ffi bitfield. (nielsdos)
Original file line number Diff line number Diff line change
1
+ --TEST--
2
+ GH-10437 (Segfault/assertion when using fibers in shutdown function after bailout)
3
+ --FILE--
4
+ <?php
5
+
6
+ register_shutdown_function (function (): void {
7
+ var_dump (Fiber::getCurrent ());
8
+ });
9
+
10
+ $ fiber = new Fiber (function (): never {
11
+ trigger_error ('Bailout in fiber ' , E_USER_ERROR );
12
+ });
13
+ $ fiber ->start ();
14
+
15
+ ?>
16
+ --EXPECTF--
17
+ Fatal error: Bailout in fiber in %sgh10437.php on line %d
18
+ NULL
Original file line number Diff line number Diff line change @@ -543,6 +543,7 @@ static zend_always_inline zend_fiber_transfer zend_fiber_switch_to(
543
543
544
544
/* Forward bailout into current fiber. */
545
545
if (UNEXPECTED (transfer .flags & ZEND_FIBER_TRANSFER_FLAG_BAILOUT )) {
546
+ EG (active_fiber ) = NULL ;
546
547
zend_bailout ();
547
548
}
548
549
You can’t perform that action at this time.
0 commit comments