From 97253a7d7cf00adf9f41e37e96b4eb7244cc066a Mon Sep 17 00:00:00 2001 From: xuliangyu Date: Wed, 21 Feb 2024 16:29:45 +0800 Subject: [PATCH 1/2] [LoongArch64] Fix the assert error for DynamicHelpers::CreateDictionaryLookupHelper(). --- src/coreclr/vm/loongarch64/stubs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/vm/loongarch64/stubs.cpp b/src/coreclr/vm/loongarch64/stubs.cpp index da93bd587ed34..a56e3eeba88ac 100644 --- a/src/coreclr/vm/loongarch64/stubs.cpp +++ b/src/coreclr/vm/loongarch64/stubs.cpp @@ -1928,7 +1928,7 @@ PCODE DynamicHelpers::CreateDictionaryLookupHelper(LoaderAllocator * pAllocator, } } - _ASSERTE(indirectionsDataSize == dataOffset); + _ASSERTE((codeSize == dataOffset) || (indirectionsDataSize == dataOffset)); // No null test required if (!pLookup->testForNull) From 4938b09c9c882a21b2e9961bb933429fef62dfc8 Mon Sep 17 00:00:00 2001 From: Xu Liangyu Date: Tue, 27 Feb 2024 11:43:05 +0800 Subject: [PATCH 2/2] Update src/coreclr/vm/loongarch64/stubs.cpp Co-authored-by: Jan Kotas --- src/coreclr/vm/loongarch64/stubs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/coreclr/vm/loongarch64/stubs.cpp b/src/coreclr/vm/loongarch64/stubs.cpp index a56e3eeba88ac..052d71ebc1e44 100644 --- a/src/coreclr/vm/loongarch64/stubs.cpp +++ b/src/coreclr/vm/loongarch64/stubs.cpp @@ -1928,7 +1928,7 @@ PCODE DynamicHelpers::CreateDictionaryLookupHelper(LoaderAllocator * pAllocator, } } - _ASSERTE((codeSize == dataOffset) || (indirectionsDataSize == dataOffset)); + _ASSERTE((indirectionsDataSize ? indirectionsDataSize : codeSize) == dataOffset); // No null test required if (!pLookup->testForNull)