Skip to content
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

[MacCatalyst][x64] System.Reflection.Emit.Tests.ILGeneratorEmit4.TestDynamicMethodEmitCalliNonBlittable failed. #65304

Closed
MaximLipnin opened this issue Feb 14, 2022 · 5 comments · Fixed by #65320

Comments

@MaximLipnin
Copy link
Contributor

The following is being hit in #64452:

<test name="System.Reflection.Emit.Tests.ILGeneratorEmit4.TestDynamicMethodEmitCalliNonBlittable" type="System.Reflection.Emit.Tests.ILGeneratorEmit4" method="TestDynamicMethodEmitCalliNonBlittable" time="0.0017817" result="Fail">
<failure exception-type="System.Runtime.InteropServices.MarshalDirectiveException">
    <message><![CDATA[System.Runtime.InteropServices.MarshalDirectiveException : Error marshalling return value: Cannot marshal managed types when the runtime marshalling system is disabled.]]></message>
    <stack-trace><![CDATA[   at System.Reflection.RuntimeMethodInfo.InvokeWorker(Object obj, BindingFlags invokeAttr, Span`1 parameters)]]></stack-trace>
</failure>
</test>

https://dev.azure.com/dnceng/public/_build/results?buildId=1610861&view=ms.vss-test-web.build-test-results-tab&runId=44871364&paneView=dotnet-dnceng.dnceng-build-release-tasks.helix-test-information-tab&resultId=146626

cc @steveisok @akoeplinger @lambdageek @jkoritzinsky

@dotnet-issue-labeler dotnet-issue-labeler bot added area-System.Reflection.Emit untriaged New issue has not been triaged by the area owner labels Feb 14, 2022
@ghost
Copy link

ghost commented Feb 14, 2022

Tagging subscribers to this area: @dotnet/area-system-reflection-emit
See info in area-owners.md if you want to be subscribed.

Issue Details

The following is being hit in #64452:

<test name="System.Reflection.Emit.Tests.ILGeneratorEmit4.TestDynamicMethodEmitCalliNonBlittable" type="System.Reflection.Emit.Tests.ILGeneratorEmit4" method="TestDynamicMethodEmitCalliNonBlittable" time="0.0017817" result="Fail">
<failure exception-type="System.Runtime.InteropServices.MarshalDirectiveException">
    <message><![CDATA[System.Runtime.InteropServices.MarshalDirectiveException : Error marshalling return value: Cannot marshal managed types when the runtime marshalling system is disabled.]]></message>
    <stack-trace><![CDATA[   at System.Reflection.RuntimeMethodInfo.InvokeWorker(Object obj, BindingFlags invokeAttr, Span`1 parameters)]]></stack-trace>
</failure>
</test>

https://dev.azure.com/dnceng/public/_build/results?buildId=1610861&view=ms.vss-test-web.build-test-results-tab&runId=44871364&paneView=dotnet-dnceng.dnceng-build-release-tasks.helix-test-information-tab&resultId=146626

cc @steveisok @akoeplinger @lambdageek @jkoritzinsky

Author: MaximLipnin
Assignees: -
Labels:

area-System.Reflection.Emit, untriaged

Milestone: -

@MaximLipnin MaximLipnin changed the title [MacCatalyst][x64] System.Reflection.Emit.Tests.ILGeneratorEmit4 failed. [MacCatalyst][x64] System.Reflection.Emit.Tests.ILGeneratorEmit4.TestDynamicMethodEmitCalliNonBlittable failed. Feb 14, 2022
@lambdageek
Copy link
Member

lambdageek commented Feb 14, 2022

Doesn't repro locally with a2c66883633. Nevermind, I ran the wrong testsuite.

@MaximLipnin how does the CI configuration run the tests? AOT? Trimming?

@jkoritzinsky
Copy link
Member

I think MacCatalyst runs with AOT, so this issue would be somewhere in the AOT compiler.

@lambdageek
Copy link
Member

I think MacCatalyst runs with AOT, so this issue would be somewhere in the AOT compiler.

"it depends". both AOT and interpreter are supported.

I think CI is running the tests with /p:TargetOS=MacCatalyst /p:TargetArchitecture=x64 -c Release /t:Test /p:DevTeamProvisioning=adhoc /p:RunAOTCompilation=true /p:MonoForceInterpreter=true /p:BuildDarwinFrameworks=true /p:EnableAppSandbox=true which is interpreter with AOTd trampolines.

@lambdageek lambdageek self-assigned this Feb 14, 2022
@lambdageek lambdageek removed the untriaged New issue has not been triaged by the area owner label Feb 14, 2022
lambdageek added a commit to lambdageek/runtime that referenced this issue Feb 14, 2022
The dynamic method `klass` is just System.Object, so its image is always
corelib.  As a result, we incorrectly pick up the DisableRuntimeMarshalling
attribute from CoreLib.

Fixes dotnet#65304

The corresponding change to the JIT+AOT was done in
dotnet@ac825ab
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Feb 14, 2022
lambdageek added a commit that referenced this issue Feb 14, 2022
…65320)

The dynamic method `klass` is just System.Object, so its image is always
corelib.  As a result, we incorrectly pick up the DisableRuntimeMarshalling
attribute from CoreLib.

Fixes #65304

The corresponding change to the JIT+AOT was done in
ac825ab
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Feb 14, 2022
@MaximLipnin
Copy link
Contributor Author

@lambdageek Thanks!

@ghost ghost locked as resolved and limited conversation to collaborators Mar 17, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants