From 8357315f40f9af99adaa52083d3976e88a115adf Mon Sep 17 00:00:00 2001 From: Radek Doulik Date: Tue, 7 Oct 2025 17:36:23 +0200 Subject: [PATCH] Do not use MarkPrecodeAsStableEntrypoint with portable entrypoints Fixes https://github.com/dotnet/runtime/issues/120319 --- src/coreclr/vm/method.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/coreclr/vm/method.cpp b/src/coreclr/vm/method.cpp index 6eb4204c1630f0..45ad17319083b5 100644 --- a/src/coreclr/vm/method.cpp +++ b/src/coreclr/vm/method.cpp @@ -2711,12 +2711,14 @@ void MethodDesc::SetTemporaryEntryPoint(AllocMemTracker *pamTracker) _ASSERTE(*pSlot != (PCODE)NULL); #endif +#ifndef FEATURE_PORTABLE_ENTRYPOINTS if (RequiresStableEntryPoint()) { // The rest of the system assumes that certain methods always have stable entrypoints. // Mark the precode as such MarkPrecodeAsStableEntrypoint(); } +#endif // FEATURE_PORTABLE_ENTRYPOINTS } void MethodDesc::EnsureTemporaryEntryPoint()