Skip to content
This repository has been archived by the owner on Nov 1, 2020. It is now read-only.

Support for default interface methods #8066

Open
hez2010 opened this issue Apr 2, 2020 · 3 comments
Open

Support for default interface methods #8066

hez2010 opened this issue Apr 2, 2020 · 3 comments
Milestone

Comments

@hez2010
Copy link

hez2010 commented Apr 2, 2020

After I fixed dotnet/efcore#20393 with PR dotnet/efcore#20494, I built efcore again with CoreRT but this time I got 0xc0000005:

......
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.PropertyParameterBinding.BindToParameter(ParameterBindingInfo)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.PropertyParameterBinding..ctor(IProperty)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.ParameterBindingInfo.GetValueBufferIndex(IPropertyBase)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.ParameterBindingInfo.get_MaterializationContextExpression()...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.ParameterBindingInfo.get_EntityType()...  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.ParameterBindingInfo..ctor(IEntityType,Expression)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.ParameterBindingInfo.__GetFieldHelper(int32,EETypePtr&)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.ObjectArrayParameterBinding.BindToParameter(ParameterBindingInfo)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.ObjectArrayParameterBinding..ctor(IReadOnlyList`1<ParameterBinding>)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.MemberIdentity..cctor()...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.MemberIdentity.DebuggerDisplay()...     
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.MemberIdentity.get_MemberInfo()...      
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.MemberIdentity.get_Name()...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.MemberIdentity.Create(MemberInfo)...    
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.MemberIdentity.Create(string)...        
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.MemberIdentity.IsNone()...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.MemberIdentity..ctor(object)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.MemberIdentity..ctor(MemberInfo)...     
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.MemberIdentity..ctor(string)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.MemberIdentity.__GetFieldHelper(int32,EETypePtr&)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.LazyLoaderParameterBindingFactoryDependencies..ctor()...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.LazyLoaderParameterBindingFactory..cctor()...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.LazyLoaderParameterBindingFactory.IsLazyLoaderAsyncMethod(Type,string)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.LazyLoaderParameterBindingFactory.IsLazyLoaderMethod(Type,string)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.LazyLoaderParameterBindingFactory.IsLazyLoader(Type)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.LazyLoaderParameterBindingFactory.Bind(IEntityType,Type)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.LazyLoaderParameterBindingFactory.Bind(IConventionEntityType,Type,string)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.LazyLoaderParameterBindingFactory.Bind(IMutableEntityType,Type,string)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.LazyLoaderParameterBindingFactory.CanBind(Type,string)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.LazyLoaderParameterBindingFactory..ctor(LazyLoaderParameterBindingFactoryDependencies)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.ServiceParameterBindingFactory.<Bind>b__4_0(IConventionServiceProperty)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.ServiceParameterBindingFactory.<Bind>b__3_0(IMutableServiceProperty)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.ServiceParameterBindingFactory.Bind(IConventionEntityType,Type,string)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.ServiceParameterBindingFactory.Bind(IMutableEntityType,Type,string)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.ServiceParameterBindingFactory.CanBind(Type,string)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.ServiceParameterBindingFactory..ctor(Type)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.ISkipNavigation.Microsoft.EntityFrameworkCore.Metadata.INavigationBase.GetCollectionAccessor()...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.ISkipNavigation.Microsoft.EntityFrameworkCore.Metadata.INavigationBase.get_Inverse()...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.ISkipNavigation.get_AssociationEntityType()...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.IPropertyBase.GetPropertyAccessMode()...  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.IProperty.Microsoft.EntityFrameworkCore.Metadata.IPropertyBase.GetPropertyAccessMode()...
  Compiling [S.P.CompilerGenerated]Internal.CompilerGenerated.<Module>.InvokeRetO<ValueGenerated>(object,native int,ArgSetupState&,bool)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.INavigationBase.Microsoft.EntityFrameworkCore.Metadata.IPropertyBase.GetPropertyAccessMode()...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.INavigationBase.get_IsEagerLoaded()...  
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.INavigation.Microsoft.EntityFrameworkCore.Metadata.INavigationBase.GetCollectionAccessor()...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.INavigation.Microsoft.EntityFrameworkCore.Metadata.INavigationBase.get_IsCollection()...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.INavigation.get_IsOnDependent()...      
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.INavigation.Microsoft.EntityFrameworkCore.Metadata.INavigationBase.get_Inverse()...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.INavigation.get_Inverse()...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.INavigation.Microsoft.EntityFrameworkCore.Metadata.INavigationBase.get_TargetEntityType()...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.INavigation.Microsoft.EntityFrameworkCore.Metadata.INavigationBase.get_DeclaringEntityType()...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.IMutableSkipNavigation.get_Inverse()... 
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.IMutableSkipNavigation.get_ForeignKey()...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.IMutableSkipNavigation.get_AssociationEntityType()...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.IMutablePropertyBase.SetFieldInfo(string)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.IMutableNavigationBase.SetIsEagerLoaded(Nullable`1<bool>)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.IMutableNavigationBase.get_Inverse()... 
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.IMutableNavigationBase.get_TargetEntityType()...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.IMutableNavigationBase.get_DeclaringEntityType()...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.IMutableNavigation.get_Inverse()...     
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.IMutableNavigation.get_ForeignKey()...  
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.IMutableForeignKey.GetReferencingSkipNavigations()...
  Compiling [S.P.CompilerGenerated]Internal.CompilerGenerated.<Module>.InvokeRetO<DeleteBehavior>(object,native int,ArgSetupState&,bool)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType.GetDeclaredSkipNavigations()...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType.FindDeclaredSkipNavigation(string)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType.FindSkipNavigation(MemberInfo)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.IMutableEntityType.SetPrimaryKey(IMutableProperty)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.IForeignKey.<GetReferencingSkipNavigations>b__20_1(ISkipNavigation)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.IForeignKey.<GetReferencingSkipNavigations>b__20_0(ISkipNavigation)...
  Compiling [Microsoft.EntityFrameworkCore]Microsoft.EntityFrameworkCore.Metadata.IForeignKey.GetReferencingSkipNavigations()...
C:\Users\hez20\.nuget\packages\microsoft.dotnet.ilcompiler\1.0.0-alpha-28802-01\build\Microsoft.NETCore.Native.targets(230,5): error MSB3073: command ""C:\Users\hez20\.nuget\packages\runtime.win-x64.microsoft.dotnet.ilcompiler\1.0.0-alpha-28802-01\tools\ilc" @"obj\Debug\netcoreapp3.1\win-x64\native\Test.ilc.rsp"" exited with code -1073741819. [C:\Users\hez20\source\Test\Test.csproj]

If I backport my fix to release/3.1 branch, there will be no issue while building with CoreRT.

@MichalStrehovsky
Copy link
Member

Could you zip up the assemblies/files referenced from obj\Debug\netcoreapp3.1\win-x64\native\Test.ilc.rsp and attach them along with the rsp file itself so that I can repro this locally? The compiler crashing with an access violation is something that shouldn't happen.

@hez2010
Copy link
Author

hez2010 commented Apr 2, 2020

Here're Test.ilc.rsp and all referenced assembiles:
rsp_with_refs.zip

@MichalStrehovsky
Copy link
Member

Thanks. I was afraid of this - Microsoft.EntityFrameworkCore.Metadata.IForeignKey.GetReferencingSkipNavigations is a default interface method. CoreRT doesn't support default interface methods yet :(.

@MichalStrehovsky MichalStrehovsky changed the title 0xc0000005 Access violation when build efcore (master branch) Support for default interface methods Apr 2, 2020
@MichalStrehovsky MichalStrehovsky added this to the Preview milestone Apr 2, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants