Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2021-10-19 20:01:37 +0300
committerGitHub <noreply@github.com>2021-10-19 20:01:37 +0300
commit0879ce870777a26705959129d914c0e088b815ec (patch)
treee9ec5bc961a6ac44454a8e6d235946accb51d6cf /src/coreclr
parentdd936c687f8c4cd102d911096ede5221b5fb30c0 (diff)
[release/6.0] Use custom error message when running out of syncblocks (#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 <jkotas@microsoft.com> Co-authored-by: Jan Kotas <jkotas@microsoft.com> Co-authored-by: Manish Godse <61718172+mangod9@users.noreply.github.com>
Diffstat (limited to 'src/coreclr')
-rw-r--r--src/coreclr/dlls/mscorrc/mscorrc.rc1
-rw-r--r--src/coreclr/dlls/mscorrc/resource.h1
-rw-r--r--src/coreclr/vm/syncblk.cpp2
3 files changed, 3 insertions, 1 deletions
diff --git a/src/coreclr/dlls/mscorrc/mscorrc.rc b/src/coreclr/dlls/mscorrc/mscorrc.rc
index 161f6e1e6c8..7f83466b055 100644
--- a/src/coreclr/dlls/mscorrc/mscorrc.rc
+++ b/src/coreclr/dlls/mscorrc/mscorrc.rc
@@ -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."
diff --git a/src/coreclr/dlls/mscorrc/resource.h b/src/coreclr/dlls/mscorrc/resource.h
index 0e39c27f0c8..7acb390b640 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 1a2c9358bf1..b6e3f58bd21 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];