Commit 13f9524
[release/10.0-rc1] JIT: fix issue with EH clause class types for fault/filters from C++/CLI (#118905)
* JIT: fix issue with EH clause class types for fault/filters from C++/CLI
C++/CLI appears to leave the CORINFO_EH_CLAUSE ClassToken/FilterOffset union
set to some nonzero value for fault/filter clauses. The JIT currently just
passes this value along to the runtime.
If a method with such a nonzero field is inlined into a dynamic method, this
trips up a check in the runtime where a nonzero entry for such a field is
interpreted as a class handle, even for fault/filter clauses where it should
be ignored.
Tolerate this by zeroing the field in the JIT.
Note this could not have happened in pre .NET10 as methods
with EH could not be inlined, so a dynamic method would never see such
an EH clause, and in non-dynamic methods this field is ignored for
faults and filters.
Fixes #118837.
* review feedback
* zero eh table on alloc/realloc
---------
Co-authored-by: Andy Ayers <[email protected]>1 parent e2b61c7 commit 13f9524
File tree
4 files changed
+16
-9
lines changed- src/coreclr
- jit
- tools/aot/ILCompiler.ReadyToRun/JitInterface
- vm
4 files changed
+16
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3741 | 3741 | | |
3742 | 3742 | | |
3743 | 3743 | | |
3744 | | - | |
3745 | | - | |
3746 | | - | |
3747 | | - | |
| 3744 | + | |
| 3745 | + | |
3748 | 3746 | | |
3749 | 3747 | | |
3750 | 3748 | | |
| 3749 | + | |
3751 | 3750 | | |
3752 | 3751 | | |
3753 | 3752 | | |
3754 | 3753 | | |
3755 | 3754 | | |
3756 | 3755 | | |
| 3756 | + | |
3757 | 3757 | | |
3758 | 3758 | | |
3759 | 3759 | | |
3760 | | - | |
3761 | | - | |
3762 | 3760 | | |
3763 | 3761 | | |
3764 | 3762 | | |
3765 | 3763 | | |
3766 | 3764 | | |
3767 | 3765 | | |
3768 | 3766 | | |
| 3767 | + | |
| 3768 | + | |
| 3769 | + | |
3769 | 3770 | | |
3770 | 3771 | | |
3771 | 3772 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1522 | 1522 | | |
1523 | 1523 | | |
1524 | 1524 | | |
| 1525 | + | |
| 1526 | + | |
1525 | 1527 | | |
1526 | 1528 | | |
1527 | 1529 | | |
| |||
1883 | 1885 | | |
1884 | 1886 | | |
1885 | 1887 | | |
| 1888 | + | |
| 1889 | + | |
| 1890 | + | |
| 1891 | + | |
1886 | 1892 | | |
1887 | 1893 | | |
1888 | 1894 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3117 | 3117 | | |
3118 | 3118 | | |
3119 | 3119 | | |
3120 | | - | |
3121 | | - | |
| 3120 | + | |
| 3121 | + | |
3122 | 3122 | | |
3123 | 3123 | | |
3124 | 3124 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12734 | 12734 | | |
12735 | 12735 | | |
12736 | 12736 | | |
12737 | | - | |
| 12737 | + | |
12738 | 12738 | | |
12739 | 12739 | | |
12740 | 12740 | | |
| |||
0 commit comments