Remove init_count zeroing from PAL cleanup
authorJan Vorlicek <janvorli@microsoft.com>
Thu, 7 Mar 2019 15:10:55 +0000 (16:10 +0100)
committerJan Vorlicek <janvorli@microsoft.com>
Thu, 7 Mar 2019 15:10:55 +0000 (16:10 +0100)
Setting the init_count to 0 in the PALCommonCleanup was causing
intermittent crashes in the GC stress C tests on Linux with
SIGILL. The reason is that the signal handlers do nothing and call a
previous handler in case the PAL is not initialized, which is indicated
by the init_count being zero.

To fix that issue, I have removed the init_count zeroing at process
exit, since the PAL and runtime is still capable of handling the
signals.

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

src/coreclr/src/pal/src/init/pal.cpp

index f6bbd6a..8150406 100644 (file)
@@ -1042,9 +1042,6 @@ PALCommonCleanup()
         PROCDumpThreadList();
 #endif
     }
-
-    // Mark that the PAL is uninitialized
-    init_count = 0;
 }
 
 BOOL PALIsShuttingDown()