Commit 0e18180
[mono][interp] Properly handle exceptions thrown by mono_marshal_get_native_wrapper (dotnet#110232)
* [mono][interp] Defer calls to mono_marshal_get_native_wrapper at execution
This can end up calling into managed where exceptions can be thrown. Throwing exceptions while method compilation happens in not valid behavior. This follows the same approach from the jit side in mono/mono#20177.
* [mono][interp] Check resume state when returning from method compilation
* [mono][interp] Fix tiering disable condition
We always optimize managed wrappers. If we are attempting to compile and execute a pinvoke method, we will use the m2n wrapper instead. Make sure we check for this when disabling tiering, since swift interop relies on these wrappers to be always optimized.1 parent eb0f4d2 commit 0e18180
2 files changed
+21
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
502 | 502 | | |
503 | 503 | | |
504 | 504 | | |
505 | | - | |
| 505 | + | |
506 | 506 | | |
| 507 | + | |
507 | 508 | | |
508 | 509 | | |
509 | 510 | | |
| |||
3916 | 3917 | | |
3917 | 3918 | | |
3918 | 3919 | | |
| 3920 | + | |
3919 | 3921 | | |
3920 | 3922 | | |
3921 | 3923 | | |
| |||
4372 | 4374 | | |
4373 | 4375 | | |
4374 | 4376 | | |
| 4377 | + | |
4375 | 4378 | | |
4376 | 4379 | | |
4377 | 4380 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2691 | 2691 | | |
2692 | 2692 | | |
2693 | 2693 | | |
2694 | | - | |
2695 | | - | |
2696 | 2694 | | |
2697 | 2695 | | |
2698 | 2696 | | |
| |||
3748 | 3746 | | |
3749 | 3747 | | |
3750 | 3748 | | |
3751 | | - | |
| 3749 | + | |
3752 | 3750 | | |
3753 | 3751 | | |
| 3752 | + | |
| 3753 | + | |
| 3754 | + | |
| 3755 | + | |
| 3756 | + | |
| 3757 | + | |
| 3758 | + | |
| 3759 | + | |
| 3760 | + | |
| 3761 | + | |
3754 | 3762 | | |
3755 | 3763 | | |
3756 | 3764 | | |
| |||
9898 | 9906 | | |
9899 | 9907 | | |
9900 | 9908 | | |
9901 | | - | |
| 9909 | + | |
| 9910 | + | |
9902 | 9911 | | |
9903 | 9912 | | |
9904 | 9913 | | |
9905 | 9914 | | |
9906 | 9915 | | |
9907 | 9916 | | |
9908 | 9917 | | |
9909 | | - | |
| 9918 | + | |
| 9919 | + | |
9910 | 9920 | | |
| 9921 | + | |
| 9922 | + | |
9911 | 9923 | | |
9912 | 9924 | | |
9913 | 9925 | | |
| |||
0 commit comments