-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempting to JIT compile method in System.Text.Json tests on iOS devices #58204
Comments
A number of tests using `dynamic` can't work on iOS devices due to System.Reflection.Emit not being supported, added PlatformDetection checks for those. A few other tests run into an "Attempting to JIT compile method" issue that is tracked by dotnet#58204
A number of tests using `dynamic` can't work on iOS devices due to "dynamic invoke" (where Mono does an indirect runtime invoke using a single universal invoke wrapper) not being supported, added PlatformDetection checks for System.Reflection.Emit since that is a close enough approximation for those. A few other tests run into an "Attempting to JIT compile method" issue that is tracked by #58204
@SamMonoRT who is working on this? |
@marek-safar - at the moment no one, but believe @imhameed has a PR up for fullaot and may have seen this error ? |
I've seen this for several runtime tests (see #57350), but I don't know what the cause or causes are yet. |
Nevermind. I misunderstood what #58276 was doing |
@lambdageek no, the issues here are not in tests using |
I wasn't able to deploy the test app to device. I'll investigate next week once I'm added to Microsoft iOS Development Team |
Yup, the command for that is: (note that we currently have a bug where we don't recognize that we ILStripped the binaries so if you run this a second time it'll try to AOT the stripped binaries which will fail, probably best to just comment out the |
These failures are caused by limitations in gsharedvt existing since its implementation. The limitation is reproduced with a constrained call with a signature containing multiple gsharedvt args. (https://github.com/dotnet/runtime/blob/main/src/mono/mono/mini/method-to-ir.c#L3684) This issue can be reproduced from the iOS sample when executing this code
When aot compilling @vargaz will take a look at this but the fix is likely not trivial so I don't see this making 6.0 |
Moving to 7.0 based on above comments. |
gsharedvt methods. Fixes dotnet#58204.
@vargaz Does #59182 seem risky overall? @SamMonoRT @akoeplinger @layomia Are the testcases here something contrived or possibly something that real users could run into? (@layomia it's the ones from #58276) |
It's somewhat risky, if this is needed for 6.0, we can create a version where the new code is ifdef ios|android, and the old code is used on wasm. |
I think we should hold off unless we get some customer reports that this is a problem in practice. |
) * [mono] Remove some of the restrictions on constrained calls from gsharedvt methods. Fixes #58204. * Reenable tests.
When running the System.Text.Json tests on iOS arm64 devices with full AOT we're seeing the following methods where it attempts to JIT compile them, causing an ExecutionEngineException:
It's not clear why these fail, needs to be investigated.
/cc @lambdageek
The text was updated successfully, but these errors were encountered: