Skip to content

Commit 235b562

Browse files
authored
[RISC-V] Add missing jumpTable increment (#98992)
After #98671 we noticed that some of coreclr tests started crashing because of infinite recursion seen like: root@3b821d4a686a:/runtime/artifacts/tests/coreclr/linux.riscv64.Checked/CoreMangLib/system/buffer/ASURT_99893# $CORE_ROOT/corerun -p System.Reflection.Metadata.MetadataUpdater.IsSupported=false -p System.Runtime.Serialization.EnableUnsafeBinaryFormatterSerialization=true ASURT_99893.dll '' Process terminated. Encountered infinite recursion while looking up resource 'Arg_ResourceFileUnsupportedVersion' in System.Private.CoreLib. Verify the installation of .NET is complete and does not need repairing, and that the state of the process has not become corrupted. at System.Environment.FailFast(System.String) at System.SR.InternalGetResourceString(System.String) at System.SR.GetResourceString(System.String) at System.SR.get_Arg_ResourceFileUnsupportedVersion() at System.Resources.ResourceReader._ReadResources() at System.Resources.ResourceReader.ReadResources() at System.Resources.ResourceReader..ctor(System.IO.Stream, System.Collections.Generic.Dictionary`2<System.String,System.Resources.ResourceLocator>, Boolean) at System.Resources.RuntimeResourceSet..ctor(System.IO.Stream, Boolean) at System.Resources.ManifestBasedResourceGroveler.CreateResourceSet(System.IO.Stream, System.Reflection.Assembly) at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(System.Globalization.CultureInfo, System.Collections.Generic.Dictionary`2<System.String,System.Resources.ResourceSet>, Boolean, Boolean) at System.Resources.ResourceManager.InternalGetResourceSet(System.Globalization.CultureInfo, Boolean, Boolean) at System.Resources.ResourceManager.GetString(System.String, System.Globalization.CultureInfo) at System.SR.InternalGetResourceString(System.String) at System.SR.GetResourceString(System.String) at System.SR.get_Arg_ResourceFileUnsupportedVersion() at System.Resources.ResourceReader._ReadResources() at System.Resources.ResourceReader.ReadResources() at System.Resources.ResourceReader..ctor(System.IO.Stream, System.Collections.Generic.Dictionary`2<System.String,System.Resources.ResourceLocator>, Boolean) at System.Resources.RuntimeResourceSet..ctor(System.IO.Stream, Boolean) at System.Resources.ManifestBasedResourceGroveler.CreateResourceSet(System.IO.Stream, System.Reflection.Assembly) at System.Resources.ManifestBasedResourceGroveler.GrovelForResourceSet(System.Globalization.CultureInfo, System.Collections.Generic.Dictionary`2<System.String,System.Resources.ResourceSet>, Boolean, Boolean) This change fixes issue by adding missing jumpTable increment.
1 parent a2761cc commit 235b562

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/coreclr/jit/codegenriscv64.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2867,6 +2867,7 @@ void CodeGen::genJumpTable(GenTree* treeNode)
28672867
for (unsigned i = 0; i < jumpCount; i++)
28682868
{
28692869
BasicBlock* target = (*jumpTable)->getDestinationBlock();
2870+
jumpTable++;
28702871
noway_assert(target->HasFlag(BBF_HAS_LABEL));
28712872

28722873
JITDUMP(" DD L_M%03u_" FMT_BB "\n", compiler->compMethodID, target->bbNum);

0 commit comments

Comments
 (0)