Skip to content

Commit

Permalink
Use custom error message when running out of syncblocks (#60013)
Browse files Browse the repository at this point in the history
Contributes to #49215
  • Loading branch information
jkotas authored Oct 6, 2021
1 parent 8486eac commit 62d70c4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/coreclr/dlls/mscorrc/mscorrc.rc
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/dlls/mscorrc/resource.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/syncblk.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 62d70c4

Please sign in to comment.