diff options
author | Koundinya Veluri <kouvel@users.noreply.github.com> | 2018-04-03 08:49:10 -0700 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2018-04-03 17:49:10 +0200 |
commit | ee1bcc8ff0987383fdafc41e04e264b9ffb0f985 (patch) | |
tree | afbd5edb25cdcf1da4a2b953e06f561c1c182c1b /src/vm | |
parent | 03356bcf59b4567bfdf4070f599771b01220bd95 (diff) | |
download | coreclr-ee1bcc8ff0987383fdafc41e04e264b9ffb0f985.tar.gz coreclr-ee1bcc8ff0987383fdafc41e04e264b9ffb0f985.tar.bz2 coreclr-ee1bcc8ff0987383fdafc41e04e264b9ffb0f985.zip |
Increase crst level for ReadyToRunInfo's map lock (#17376)
Fixes regex-redux-1 failure seen in https://github.com/dotnet/coreclr/issues/15309
- HashMap lookups and insertions occur under a level 0 lock and may enter cooperative GC mode inside the lock. A GC that is triggered may delete some dynamic code, which takes another level 0 lock. It does not look like it's possible for a deadlock as a result.
- Fixed by increasing the crst level for the lock used in ReadyToRunInfo
Diffstat (limited to 'src/vm')
-rw-r--r-- | src/vm/readytoruninfo.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vm/readytoruninfo.cpp b/src/vm/readytoruninfo.cpp index e8446d43a1..699e159199 100644 --- a/src/vm/readytoruninfo.cpp +++ b/src/vm/readytoruninfo.cpp @@ -544,7 +544,8 @@ PTR_ReadyToRunInfo ReadyToRunInfo::Initialize(Module * pModule, AllocMemTracker } ReadyToRunInfo::ReadyToRunInfo(Module * pModule, PEImageLayout * pLayout, READYTORUN_HEADER * pHeader, AllocMemTracker *pamTracker) - : m_pModule(pModule), m_pLayout(pLayout), m_pHeader(pHeader), m_Crst(CrstLeafLock), m_pPersistentInlineTrackingMap(NULL) + : m_pModule(pModule), m_pLayout(pLayout), m_pHeader(pHeader), m_Crst(CrstReadyToRunEntryPointToMethodDescMap), + m_pPersistentInlineTrackingMap(NULL) { STANDARD_VM_CONTRACT; |