diff --git a/src/coreclr/dlls/mscorrc/mscorrc.rc b/src/coreclr/dlls/mscorrc/mscorrc.rc index 6a25003ccf2310..2dcd495c3fe619 100644 --- a/src/coreclr/dlls/mscorrc/mscorrc.rc +++ b/src/coreclr/dlls/mscorrc/mscorrc.rc @@ -495,6 +495,7 @@ BEGIN IDS_EE_ARRAY_DIMENSIONS_EXCEEDED "Array dimensions exceeded supported range." + IDS_EE_OUT_OF_SYNCBLOCKS "Internal limitation: attempt to create more than 2^26 SyncBlocks." IDS_EE_THREAD_NOTSTARTED "Thread has not been started." IDS_EE_STRING_TOOLONG "Marshaler restriction: Excessively long string." diff --git a/src/coreclr/dlls/mscorrc/resource.h b/src/coreclr/dlls/mscorrc/resource.h index bc7d05bade6ff4..755af627186315 100644 --- a/src/coreclr/dlls/mscorrc/resource.h +++ b/src/coreclr/dlls/mscorrc/resource.h @@ -369,6 +369,7 @@ #define IDS_EE_COMIMPORT_METHOD_NO_INTERFACE 0x1aab #define IDS_EE_OUT_OF_MEMORY_WITHIN_RANGE 0x1aac #define IDS_EE_ARRAY_DIMENSIONS_EXCEEDED 0x1aad +#define IDS_EE_OUT_OF_SYNCBLOCKS 0x1aae #define IDS_CLASSLOAD_MI_CANNOT_OVERRIDE 0x1ab3 #define IDS_CLASSLOAD_COLLECTIBLEFIXEDVTATTR 0x1ab6 diff --git a/src/coreclr/vm/syncblk.cpp b/src/coreclr/vm/syncblk.cpp index 1a2c9358bf1baa..b6e3f58bd21286 100644 --- a/src/coreclr/vm/syncblk.cpp +++ b/src/coreclr/vm/syncblk.cpp @@ -840,7 +840,7 @@ void SyncBlockCache::Grow() if (!(newSyncTableSize > m_SyncTableSize)) // Make sure we actually found room to grow! { - COMPlusThrowOM(); + EX_THROW(EEMessageException, (kOutOfMemoryException, IDS_EE_OUT_OF_SYNCBLOCKS)); } newSyncTable = new SyncTableEntry[newSyncTableSize];