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

canGetCookieForPInvokeCalliSig not implemented #5587

Closed
mellinoe opened this Issue Mar 20, 2018 · 7 comments

Comments

Projects
None yet
5 participants
@mellinoe
Contributor

mellinoe commented Mar 20, 2018

I was trying to compile this project with CoreRT: https://github.com/mellinoe/veldrid/tree/master/src/NeoDemo.

I added the latest Microsoft.DotNet.ILCompiler package and simply ran dotnet publish -r win-x64.

  ILCompiler.CodeGenerationFailedException: Code generation failed ---> System.NotImplementedException: canGetCookieForPInvokeCalliSig
     at Internal.JitInterface.CorInfoImpl.canGetCookieForPInvokeCalliSig(CORINFO_SIG_INFO* szMetaSig)
     at Internal.JitInterface.CorInfoImpl._canGetCookieForPInvokeCalliSig(IntPtr thisHandle, IntPtr* ppException, CORINFO_SIG_INFO* szMetaSig)
     --- End of inner exception stack trace ---
     at Internal.JitInterface.CorInfoImpl.CompileMethod(IMethodCodeNode methodCodeNodeNeedingCode, MethodIL methodIL)
     at ILCompiler.RyuJitCompilation.ComputeDependencyNodeDependencies(List`1 obj)
     at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ComputeMarkedNodes()
     at ILCompiler.RyuJitCompilation.CompileInternal(String outputFile, ObjectDumper dumper)
     at ILCompiler.Compilation.ILCompiler.ICompilation.Compile(String outputFile, ObjectDumper dumper)
     at ILCompiler.Program.Run(String[] args)
     at ILCompiler.Program.Main(String[] args)

Any plans to implement this functionality, or is it tracked anywhere else? I searched briefly but didn't find anything.

@MichalStrehovsky

This comment has been minimized.

Member

MichalStrehovsky commented Mar 23, 2018

Thanks for reporting it! We don't track this anywhere because we didn't hit it yet. Seems like this is from a calli to a p/invoke. I'll have a look if we can do something easy there in the next couple of days.

@mellinoe

This comment has been minimized.

Contributor

mellinoe commented Mar 23, 2018

Seems like this is from a calli to a p/invoke.

Yes, that's likely, and it's probably from this library. If that's the case, then a simpler repro could probably be created from that package alone.

@mellinoe

This comment has been minimized.

Contributor

mellinoe commented Apr 7, 2018

Small update: I checked again and this is indeed caused by the above library. SharpDX hits the same issue since it also uses calli directly.

@Krakean

This comment has been minimized.

Krakean commented Apr 13, 2018

@MichalStrehovsky +1, can't use SharpDX due this :-\

@feliwir

This comment has been minimized.

feliwir commented Apr 14, 2018

@MichalStrehovsky +1 we are hitting this issue aswell in our project. Would greatly appreciate a fix

MichalStrehovsky added a commit to MichalStrehovsky/corert that referenced this issue Apr 17, 2018

Add StdCall intrinsic support
This is a building block to be able to write a repro case for dotnet#5587 in C#. With this, it's possible to use `AddrOf` intrinsic in connection with `StdCall` to hit the unimplemented functionality with pure C#.

jkotas added a commit to jkotas/corert that referenced this issue Jun 19, 2018

PInvoke calli
- Enable JIT to replace PInvoke calli with a regular call to a stub
- Implement plumbing required to generate the calli stub

Implement PInvoke calli by allowing

Contributes to dotnet#5587

@jkotas jkotas referenced this issue Jun 19, 2018

Merged

PInvoke calli #5960

jkotas added a commit to jkotas/corert that referenced this issue Jun 19, 2018

PInvoke calli
- Enable JIT to replace PInvoke calli with a regular call to a stub
- Implement plumbing required to generate the calli stub

Implement PInvoke calli by allowing

Contributes to dotnet#5587

jkotas added a commit to jkotas/corert that referenced this issue Jun 19, 2018

PInvoke calli
- Enable JIT to replace PInvoke calli with a regular call to a stub
- Implement plumbing required to generate the calli stub

Contributes to dotnet#5587

jkotas added a commit to jkotas/corert that referenced this issue Jun 20, 2018

PInvoke calli
- Enable JIT to replace PInvoke calli with a regular call to a stub
- Implement plumbing required to generate the calli stub

Contributes to dotnet#5587

jkotas added a commit to jkotas/corert that referenced this issue Jun 23, 2018

PInvoke calli
- Enable JIT to replace PInvoke calli with a regular call to a stub
- Implement plumbing required to generate the calli stub

Contributes to dotnet#5587

jkotas added a commit to jkotas/corert that referenced this issue Jun 23, 2018

jkotas added a commit that referenced this issue Jun 24, 2018

jkotas added a commit to jkotas/corert that referenced this issue Jun 24, 2018

jkotas added a commit to jkotas/corert that referenced this issue Jun 25, 2018

Add StdCall intrinsic support
This is a building block to be able to write a repro case for dotnet#5587 in C#. With this, it's possible to use `AddrOf` intrinsic in connection with `StdCall` to hit the unimplemented functionality with pure C#.

jkotas added a commit to jkotas/corert that referenced this issue Jun 25, 2018

Plumbing required to generate the calli stub
Contributes to dotnet#5587

This reverts commit c101f3e.

WIP

jkotas added a commit to jkotas/corert that referenced this issue Jun 29, 2018

Add StdCall intrinsic support
This is a building block to be able to write a repro case for dotnet#5587 in C#. With this, it's possible to use `AddrOf` intrinsic in connection with `StdCall` to hit the unimplemented functionality with pure C#.

jkotas added a commit to jkotas/corert that referenced this issue Jun 29, 2018

jkotas added a commit to jkotas/corert that referenced this issue Jun 29, 2018

jkotas added a commit to jkotas/corert that referenced this issue Jun 29, 2018

MichalStrehovsky added a commit that referenced this issue Jul 2, 2018

Add StdCall intrinsic support
This is a building block to be able to write a repro case for #5587 in C#. With this, it's possible to use `AddrOf` intrinsic in connection with `StdCall` to hit the unimplemented functionality with pure C#.

MichalStrehovsky added a commit that referenced this issue Jul 2, 2018

@jkotas

This comment has been minimized.

Member

jkotas commented Jul 2, 2018

@mellinoe @Krakean @feliwir The CoreRT packages with the fix are available now. Please give it a try and please let us know if you run into other blocking issues for you project.

@mellinoe

This comment has been minimized.

Contributor

mellinoe commented Jul 3, 2018

@jkotas I get a lot further now, and most of my code works. I still have an issue with SharpDX which I filed over in #6042 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment