Commit 3e1f672
[release/8.0-staging] [mono][interp] Fix incorrect stack type information (#94966)
* [mono][interp] Don't link bblock after rethrow
* [mono][interp] Small code refactoring
* [mono][interp] Fix incorrect stack type information
Assume we have a basic block that it is a forward branch destination, then its stack type information will be initialized at the moment of branching (let's say there is a value of type Obj1). If later in the code we reach this bblock by falling through (let's say the current stack contains a value of Obj2), the current stack state will be copied from the original state, with the type Obj1. If later on we do a virtual call, we will try to devirtualize it as if this is Obj1 which is incorrect, since the fallthrough path would produce an Obj2.
This commit adds missing checks for removing type information if we have different types on the execution types on incoming paths.
---------
Co-authored-by: Vlad Brezae <[email protected]>1 parent 9b0f22f commit 3e1f672
1 file changed
+25
-16
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
788 | 788 | | |
789 | 789 | | |
790 | 790 | | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
| 801 | + | |
| 802 | + | |
791 | 803 | | |
792 | 804 | | |
793 | 805 | | |
794 | 806 | | |
795 | | - | |
796 | 807 | | |
797 | 808 | | |
798 | | - | |
799 | | - | |
800 | | - | |
801 | | - | |
802 | | - | |
803 | | - | |
| 809 | + | |
| 810 | + | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
804 | 816 | | |
805 | | - | |
806 | | - | |
807 | | - | |
808 | | - | |
809 | | - | |
810 | | - | |
811 | | - | |
812 | | - | |
813 | 817 | | |
814 | 818 | | |
815 | 819 | | |
| |||
5010 | 5014 | | |
5011 | 5015 | | |
5012 | 5016 | | |
5013 | | - | |
| 5017 | + | |
| 5018 | + | |
| 5019 | + | |
| 5020 | + | |
5014 | 5021 | | |
| 5022 | + | |
5015 | 5023 | | |
5016 | 5024 | | |
5017 | 5025 | | |
| |||
7550 | 7558 | | |
7551 | 7559 | | |
7552 | 7560 | | |
| 7561 | + | |
7553 | 7562 | | |
7554 | 7563 | | |
7555 | 7564 | | |
| |||
0 commit comments