Skip to content

Commit 3e105e7

Browse files
committed
fix infinite loop in ProcessContext registration
1 parent 2c67a82 commit 3e105e7

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/JITServer/JITServer.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -872,8 +872,7 @@ HRESULT
872872
ProcessContextManager::RegisterNewProcess(DWORD pid, HANDLE processHandle, intptr_t chakraBaseAddress, intptr_t crtBaseAddress)
873873
{
874874
AutoCriticalSection autoCS(&cs);
875-
auto iter = ProcessContexts.GetIteratorWithRemovalSupport();
876-
while (iter.IsValid())
875+
for (auto iter = ProcessContexts.GetIteratorWithRemovalSupport(); iter.IsValid(); iter.MoveNext())
877876
{
878877
ProcessContext* context = iter.CurrentValue();
879878
// We can delete a ProcessContext if no ThreadContexts refer to it and the process is terminated

0 commit comments

Comments
 (0)