Commit 7e06a81
committed
Fix fallback paths in fast_long_{add,sub}_function
This was asked to be checked in #17472 (comment)
There are 2 issues:
1) The UB in the if can overflow, and can be fixed by using zend_ulong
for the sum/sub.
2) fast_long_sub_function() has a problem when result aliases.
This is fixed in the same way as fast_long_add_function() works.
Closes GH-17666.1 parent 0c3cf1f commit 7e06a81
2 files changed
+15
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
| 725 | + | |
| 726 | + | |
725 | 727 | | |
726 | | - | |
| 728 | + | |
727 | 729 | | |
728 | 730 | | |
729 | | - | |
| 731 | + | |
730 | 732 | | |
731 | 733 | | |
732 | 734 | | |
| |||
804 | 806 | | |
805 | 807 | | |
806 | 808 | | |
807 | | - | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
808 | 816 | | |
809 | 817 | | |
810 | | - | |
| 818 | + | |
811 | 819 | | |
| 820 | + | |
| 821 | + | |
812 | 822 | | |
813 | 823 | | |
814 | 824 | | |
| |||
0 commit comments