Pipelines.Sockets.Unofficial
Pipelines.Sockets.Unofficial copied to clipboard
Fix Thread Safety and other static code analysis issues reported by Infer#
#0
/_/src/Pipelines.Sockets.Unofficial/Helpers.cs:160: error: Null Dereference
%0.Pipelines.Sockets.Unofficial.Helpers$<>c__DisplayClass4_0.failures
could be null (last assigned on line 146) and is dereferenced in the call to Helpers.
.
#1
/_/src/Pipelines.Sockets.Unofficial/StreamConnection.AsyncPipeStream.cs:100: warning: Thread Safety Violation
Unprotected write. Non-private method StreamConnection$AsyncPipeStream.Read(...)
indirectly writes to field this.Pipelines.Sockets.Unofficial.StreamConnection$AsyncPipeStream._pendingRead
outside of synchronization.
Reporting because another access to the same memory occurs on a background thread, although this access may not.
#2
/_/src/Pipelines.Sockets.Unofficial/StreamConnection.AsyncPipeStream.cs:342: warning: Thread Safety Violation
Unprotected write. Non-private method StreamConnection$AsyncPipeStream.BeginRead(...)
indirectly writes to field this.Pipelines.Sockets.Unofficial.StreamConnection$AsyncPipeStream._pendingRead
outside of synchronization.
Reporting because this access may occur on a background thread.
#3
/_/src/Pipelines.Sockets.Unofficial/StreamConnection.AsyncPipeStream.cs:382: warning: Thread Safety Violation
Unprotected write. Non-private method StreamConnection$AsyncPipeStream.EndRead(...)
indirectly writes to field this.Pipelines.Sockets.Unofficial.StreamConnection$AsyncPipeStream._pendingRead
outside of synchronization.
Reporting because this access may occur on a background thread.
#4
/_/src/Pipelines.Sockets.Unofficial/StreamConnection.AsyncPipeStream.cs:483: warning: Thread Safety Violation
Unprotected write. Non-private method StreamConnection$AsyncPipeStream.ProcessDataFromAwaiterImpl()
indirectly writes to field this.Pipelines.Sockets.Unofficial.StreamConnection$AsyncPipeStream._pendingRead
outside of synchronization.
Reporting because this access may occur on a background thread.
#5
/_/src/Pipelines.Sockets.Unofficial/StreamConnection.AsyncPipeStream.netcoreapp21.cs:32: warning: Thread Safety Violation
Unprotected write. Non-private method StreamConnection$AsyncPipeStream.Read(...)
indirectly writes to field this.Pipelines.Sockets.Unofficial.StreamConnection$AsyncPipeStream._pendingRead
outside of synchronization.
Reporting because this access may occur on a background thread.
#6
/_/src/Pipelines.Sockets.Unofficial/StreamConnection.AsyncPipeStream.netcoreapp21.cs:40: warning: Thread Safety Violation
Read/Write race. Non-private method StreamConnection$AsyncPipeStream.Read(...)
indirectly reads with synchronization from this.Pipelines.Sockets.Unofficial.StreamConnection$AsyncPipeStream._pendingRead
. Potentially races with unsynchronized write in method StreamConnection$AsyncPipeStream.Read(...)
.
Reporting because this access may occur on a background thread.
#0
/_/src/Pipelines.Sockets.Unofficial/Helpers.cs:160: error: Null Dereference
%0.Pipelines.Sockets.Unofficial.Helpers$<>c__DisplayClass4_0.failures
could be null (last assigned on line 146) and is dereferenced in the call to Helpers.
.
#1
/_/src/Pipelines.Sockets.Unofficial/StreamConnection.AsyncPipeStream.cs:100: warning: Thread Safety Violation
Unprotected write. Non-private method StreamConnection$AsyncPipeStream.Read(...)
indirectly writes to field this.Pipelines.Sockets.Unofficial.StreamConnection$AsyncPipeStream._pendingRead
outside of synchronization.
Reporting because another access to the same memory occurs on a background thread, although this access may not.
#2
/_/src/Pipelines.Sockets.Unofficial/StreamConnection.AsyncPipeStream.cs:342: warning: Thread Safety Violation
Unprotected write. Non-private method StreamConnection$AsyncPipeStream.BeginRead(...)
indirectly writes to field this.Pipelines.Sockets.Unofficial.StreamConnection$AsyncPipeStream._pendingRead
outside of synchronization.
Reporting because this access may occur on a background thread.
#3
/_/src/Pipelines.Sockets.Unofficial/StreamConnection.AsyncPipeStream.cs:382: warning: Thread Safety Violation
Unprotected write. Non-private method StreamConnection$AsyncPipeStream.EndRead(...)
indirectly writes to field this.Pipelines.Sockets.Unofficial.StreamConnection$AsyncPipeStream._pendingRead
outside of synchronization.
Reporting because this access may occur on a background thread.
#4
/_/src/Pipelines.Sockets.Unofficial/StreamConnection.AsyncPipeStream.cs:483: warning: Thread Safety Violation
Unprotected write. Non-private method StreamConnection$AsyncPipeStream.ProcessDataFromAwaiterImpl()
indirectly writes to field this.Pipelines.Sockets.Unofficial.StreamConnection$AsyncPipeStream._pendingRead
outside of synchronization.
Reporting because this access may occur on a background thread.
#5
/_/src/Pipelines.Sockets.Unofficial/StreamConnection.AsyncPipeStream.netcoreapp21.cs:32: warning: Thread Safety Violation
Unprotected write. Non-private method StreamConnection$AsyncPipeStream.Read(...)
indirectly writes to field this.Pipelines.Sockets.Unofficial.StreamConnection$AsyncPipeStream._pendingRead
outside of synchronization.
Reporting because this access may occur on a background thread.
#6
/_/src/Pipelines.Sockets.Unofficial/StreamConnection.AsyncPipeStream.netcoreapp21.cs:40: warning: Thread Safety Violation
Read/Write race. Non-private method StreamConnection$AsyncPipeStream.Read(...)
indirectly reads with synchronization from this.Pipelines.Sockets.Unofficial.StreamConnection$AsyncPipeStream._pendingRead
. Potentially races with unsynchronized write in method StreamConnection$AsyncPipeStream.Read(...)
.
Reporting because this access may occur on a background thread.