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

Fix endianness issues to fix failures in Emit testsuite #75450

Merged
merged 3 commits into from
Oct 9, 2024

Conversation

giritrivedi
Copy link
Contributor

Test cases in Emit test suite are failing when run on s390x architecture.
They are failing while reading the size. The length fetched is out of range on s390x due to an endianness issue.
This fix will take care of reading the size irrespective of the endianness.

The stack trace of the failures is as below for reference.

Microsoft.CodeAnalysis.CSharp.Emit.UnitTests test net8.0 failed with 2 error(s) (4.1s)
   /dotnet-s390x/sdk/9.0.100-preview.5.24307.3/Microsoft.TestPlatform.targets(46,5): error : [xUnit.net 00:00:02.48]     Microsoft.CodeAnalysis.CSharp.DynamicAnalysis.UnitTests.DynamicAnalysisResourceTests.TestDeconstructionSpans [FAIL]
  /roslyn/src/Compilers/Test/Core/Metadata/DynamicAnalysisDataReader.cs(75): error VSTEST1: 
      Microsoft.CodeAnalysis.CSharp.DynamicAnalysis.UnitTests.DynamicAnalysisResourceTests.TestDeconstructionSpans (1s 262ms): Error Message: System
      .ArgumentOutOfRangeException : Specified argument was out of the range of valid values. (Parameter 'length')
      Stack Trace:
         at System.Reflection.Internal.MemoryBlock.CreateChecked(Byte* buffer, Int32 length)
         at System.Reflection.Metadata.BlobReader..ctor(Byte* buffer, Int32 length)
         at Microsoft.CodeAnalysis.DynamicAnalysisDataReader..ctor(Byte* buffer, Int32 size) in /roslyn/src/Compilers/Test/Core/Metadata/DynamicAnalysisDataReader.cs:line 75
         at Microsoft.CodeAnalysis.DynamicAnalysisDataReader.TryCreateFromPE(PEReader peReader, String resourceName) in /roslyn/src/Compilers/Test/Core/Metadata/DynamicAnalysisDataReader.cs:line 190
         at Microsoft.CodeAnalysis.CSharp.DynamicAnalysis.UnitTests.DynamicAnalysisResourceTests.TestDeconstructionSpans() in /roslyn/src/Compilers/CSharp/Test/Emit/Emit/DynamicAnalysis/DynamicAnalysisResourceTests.cs:line 533
         at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
         at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

Test summary: total: 1, failed: 1, succeeded: 0, skipped: 0, duration: 4.1s
Build failed with 2 error(s) in 27.8s

@giritrivedi giritrivedi requested a review from a team as a code owner October 9, 2024 07:06
@dotnet-policy-service dotnet-policy-service bot added the Community The pull request was submitted by a contributor who is not a Microsoft employee. label Oct 9, 2024
@giritrivedi
Copy link
Contributor Author

\cc @uweigand

@AlekseyTs AlekseyTs added Area-Compilers Test Test failures in roslyn-CI labels Oct 9, 2024
Copy link
Contributor

@AlekseyTs AlekseyTs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (commit 3)

@AlekseyTs AlekseyTs merged commit f2f4c87 into dotnet:main Oct 9, 2024
24 checks passed
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Oct 9, 2024
@AlekseyTs
Copy link
Contributor

@giritrivedi Thank you for the contribution.

@giritrivedi
Copy link
Contributor Author

@AlekseyTs .. Happy to contribute Thanks for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Community The pull request was submitted by a contributor who is not a Microsoft employee. Platform - Mono CoreClr Bugs specific to mono coreclr Test Test failures in roslyn-CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants