Runtime: 8.0.10
OS: Ubuntu Server 22.04
We've had multiple Fatal exceptions in our production server causing docker containers to fail due to a System.NullReferenceException in System.Threading.Thread.StartCallback(). Looking at the line in question /_/src/coreclr/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs @ 103 I can see the code is as follows:
// Called from the runtime
private void StartCallback()
{
StartHelper? startHelper = _startHelper;
Debug.Assert(startHelper != null);
_startHelper = null;
startHelper.Run();
}
If startHelper is nullable, should the final line be startHelper?.Run(); to prevent the null reference exception?
Runtime: 8.0.10
OS: Ubuntu Server 22.04
We've had multiple Fatal exceptions in our production server causing docker containers to fail due to a
System.NullReferenceExceptioninSystem.Threading.Thread.StartCallback(). Looking at the line in question/_/src/coreclr/System.Private.CoreLib/src/System/Threading/Thread.CoreCLR.cs @ 103I can see the code is as follows:If
startHelperis nullable, should the final line bestartHelper?.Run();to prevent the null reference exception?