Uh oh!
There was an error while loading. Please reload this page.
Reduce the nullability bypasses in CryptoPool.Return - #55782
Conversation
This is a walk over src/libraries/.../*.cs to find any calls to CryptoPool.Return which needed a "!" because of nullability flow. A couple of the bypasses were identifying legitimate issues, and were resolved by moving the Rent to the last thing before the try. A couple were because of the use of ArraySegment which can't structurally promise the array is non-null. But those were usually preceded by a call to ZeroMemory, and there is a CryptoPool.Return(ArraySegment) which does that already, so those "!"s were removed by changing to that overload.
ghost
commented
Jul 15, 2021
Tagging subscribers to this area: @bartonjs, @vcsjones, @krwq, @GrabYourPitchforks Issue DetailsThis is a walk over src/libraries/.../*.cs to find any calls to A couple of the bypasses were identifying legitimate issues, A couple were because of the use of ArraySegment which
|
bartonjs
commented
Jul 15, 2021
This was the followup promised from #54282 (comment). |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Stephen Toub <stoub@microsoft.com>
This is a walk over src/libraries/.../*.cs to find any calls to
CryptoPool.Return which needed a "!" because of nullability
flow.
A couple of the bypasses were identifying legitimate issues,
and were resolved by moving the Rent to the last thing before
the try.
A couple were because of the use of ArraySegment which
can't structurally promise the array is non-null. But those
were usually preceded by a call to ZeroMemory, and there
is a CryptoPool.Return(ArraySegment) which does that
already, so those "!"s were removed by changing to that
overload.