Don't close the JIT func info file on shutdown (dotnet/coreclr#18060)
authorKoundinya Veluri <kouvel@users.noreply.github.com>
Mon, 25 Jun 2018 16:41:51 +0000 (09:41 -0700)
committerJan Kotas <jkotas@microsoft.com>
Mon, 25 Jun 2018 16:41:51 +0000 (09:41 -0700)
During shutdown there can be a race between closing/nulling `compJitFuncInfoFile` in `compShutdown` and a background thread trying to write to it after checking that it was not null.

Commit migrated from https://github.com/dotnet/coreclr/commit/df78ae72d5cf3f2c2dbe4ff972732d418497f9bc

src/coreclr/src/jit/compiler.cpp

index 9706ece..67675fc 100644 (file)
@@ -1462,14 +1462,6 @@ void Compiler::compShutdown()
     }
 #endif // FEATURE_JIT_METHOD_PERF
 
-#if FUNC_INFO_LOGGING
-    if (compJitFuncInfoFile != nullptr)
-    {
-        fclose(compJitFuncInfoFile);
-        compJitFuncInfoFile = nullptr;
-    }
-#endif // FUNC_INFO_LOGGING
-
 #if COUNT_RANGECHECKS
     if (optRangeChkAll > 0)
     {