From 49b411f98b1355613fed73e29fed18c982457153 Mon Sep 17 00:00:00 2001 From: Jan Vorlicek Date: Tue, 9 Jun 2026 01:04:30 +0200 Subject: [PATCH] Fix return type misclasiffication in TransitionBlock.cs The ComputeReturnValueTreatment has a typo that causes wrong return type classification for structs passed in registers on x64 Unix. It causes wrong classification when there are two eightbytes, the first eightbyte is classified as SystemVClassificationTypeSSE and the second one is not. It may lead to GC hole in that case. --- .../Compiler/DependencyAnalysis/ReadyToRun/TransitionBlock.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TransitionBlock.cs b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TransitionBlock.cs index 4ece51700d2cf3..561b52a85d0534 100644 --- a/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TransitionBlock.cs +++ b/src/coreclr/tools/aot/ILCompiler.ReadyToRun/Compiler/DependencyAnalysis/ReadyToRun/TransitionBlock.cs @@ -370,7 +370,7 @@ public void ComputeReturnValueTreatment(CorElementType type, TypeHandle thRetTyp fpReturnSize += 1; } - if (descriptor.eightByteClassifications0 == SystemVClassificationType.SystemVClassificationTypeSSE) + if (descriptor.eightByteClassifications1 == SystemVClassificationType.SystemVClassificationTypeSSE) { fpReturnSize += 2; }