Commit 94d2d1d
committed
Fix GH-22112: assertion when error handler throws during NaN coercion
zend_parse_arg_bool_weak and zend_parse_arg_str_weak could return
success with EG(exception) already set, because zend_is_true and
convert_to_string emit the NaN coercion warning without checking
whether the user error handler threw. Recv-arg verification for a
userland function then took the no-check ZEND_VM_NEXT_OPCODE branch,
aborting on ZEND_ASSERT(!EG(exception)). Mirror the existing check in
zend_parse_arg_long_weak and propagate failure when the warning leaves
an exception pending.
Fixes GH-221121 parent 4659762 commit 94d2d1d
2 files changed
Lines changed: 41 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
537 | 537 | | |
538 | 538 | | |
539 | 539 | | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
540 | 543 | | |
541 | 544 | | |
542 | 545 | | |
| |||
762 | 765 | | |
763 | 766 | | |
764 | 767 | | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
765 | 771 | | |
766 | 772 | | |
767 | 773 | | |
| |||
0 commit comments