Skip to content

System.NullReferenceException in System.Runtime.Intrinsics.Vector256.get_IsHardwareAccelerated() #25734

@rolfbjarne

Description

@rolfbjarne

This is the failure:

Introspection.ApiCMAttachmentTest
	[PASS] CheckAttachments
	[FAIL] CheckFailAttachments : System.NullReferenceException : Object reference not set to an instance of an object.
		   at System.Runtime.Intrinsics.Vector256.get_IsHardwareAccelerated()
		   at System.SpanHelpers.IndexOf(Byte& searchSpace, Int32 searchSpaceLength, Byte& value, Int32 valueLength)
		   at System.Security.Cryptography.PemEncoding.IndexOfByOffset[TChar](ReadOnlySpan`1 str, ReadOnlySpan`1 value, Int32 startPosition)
		   at System.Security.Cryptography.PemEncoding.TryFindCore[TChar,T](ReadOnlySpan`1 pemData, PemFields& fields)
		   at System.Security.Cryptography.PemEncoding.TryFindUtf8(ReadOnlySpan`1 pemData, PemFields& fields)
		   at System.Security.Cryptography.PemEnumerator`1.Enumerator.MoveNext()
		   at System.Security.Cryptography.X509Certificates.AppleCertificatePal.TryDecodePem(ReadOnlySpan`1 rawData, Func`3 derCallback)
		   at System.Security.Cryptography.X509Certificates.X509Pal.AppleX509Pal.GetCertContentType(ReadOnlySpan`1 rawData)
		   at System.Security.Cryptography.X509Certificates.X509Certificate2.GetCertContentType(ReadOnlySpan`1 rawData)
		   at System.Security.Cryptography.X509Certificates.X509CertificateLoader.LoadCertificatePal(ReadOnlySpan`1 data)
		   at System.Security.Cryptography.X509Certificates.X509CertificateLoader.LoadCertificate(ReadOnlySpan`1 data)
		   at System.Security.Cryptography.X509Certificates.X509CertificateLoader.LoadCertificate(Byte[] data)
		   at Introspection.ApiCMAttachmentTest.GetINativeInstance(Type t) in /Users/rolf/work/dotnet/macios/mono-master/macios/tests/introspection/ApiCMAttachmentTest.cs:line 406
		   at Introspection.ApiCMAttachmentTest.CheckFailAttachments() in /Users/rolf/work/dotnet/macios/mono-master/macios/tests/introspection/ApiCMAttachmentTest.cs:line 576
		   at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
		   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

This regressed in #25583.

Old analysis

Which happens when running the Mac Catalyst introspection tests on x64 from the net11.0 branch.

This looks identical too dotnet/runtime#128901, except that setting DOTNET_MaxVectorTBitWidth=128 does not fix it.

There are also a number of other confusing factors:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions