Skip to content

Commit

Permalink
[release/6.0] Use custom error message when running out of syncblocks (
Browse files Browse the repository at this point in the history
…#60592)

* Use custom error message when running out of syncblocks

Contributes to #49215

* Update src/coreclr/dlls/mscorrc/mscorrc.rc

update message

Co-authored-by: Jan Kotas <[email protected]>

Co-authored-by: Jan Kotas <[email protected]>
Co-authored-by: Manish Godse <[email protected]>
  • Loading branch information
3 people authored Oct 19, 2021
1 parent dd936c6 commit 0879ce8
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 @@ -496,6 +496,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 0879ce8

Please sign in to comment.