File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ --TEST--
2+ Observer: VM interrupt during tailcall return to caller
3+ --DESCRIPTION--
4+ This exercises a VM interrupt raised immediately before a user function returns
5+ to a caller that invoked it through DO_FCALL. On the tailcall VM, the caller's
6+ saved opline must point to the opcode after DO_FCALL before a pending interrupt
7+ is handled.
8+ --EXTENSIONS--
9+ zend_test
10+ --INI--
11+ opcache.jit=0
12+ zend_test.observer.set_vm_interrupt_on_begin=1
13+ --FILE--
14+ <?php
15+ function interrupt_before_return (VmInterruptComparable $ left , VmInterruptComparable $ right ): void
16+ {
17+ $ left < $ right ;
18+ }
19+
20+ function call_interrupt_before_return (): void
21+ {
22+ interrupt_before_return (new VmInterruptComparable (2 ), new VmInterruptComparable (1 ));
23+ }
24+
25+ call_interrupt_before_return ();
26+ echo "ok \n" ;
27+ ?>
28+ --EXPECT--
29+ ok
You can’t perform that action at this time.
0 commit comments