[WinHttpHandler] Move _cachedSendPinnedBuffer ownership to WinHttpRequestState#101725
Conversation
|
Tagging subscribers to this area: @dotnet/ncl |
wfurt
left a comment
There was a problem hiding this comment.
LGTM.
To answer https://github.com/dotnet/corefx/pull/6500/files#diff-8db7e154523836be1aa177c05ae0decb22c602791eabf11d01823c80ac9927d8R131
It seems like the WriteAsync has also similar logic to ReadAsync, right?
Yes: Note that the logic is prone to races in both streams, but that's beyond this PR. |
This comment was marked as outdated.
This comment was marked as outdated.
|
There are possibly related outerloop failures, this needs investigation. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
|
After a second look and more testing, the failures look unrelated:
I will do a couple of further outerloop reruns before merging this. |
|
/azp run runtime-libraries-coreclr outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
|
All test failures are unrelated, merging. |
…#101725) Fixes a race between `WinHttpRequestStream.WriteAsync` and `WinHttpRequestStream.Dispose` that can lead to AV.
|
/backport to release/8.0-staging |
|
Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/9034004390 |
…#101725) Fixes a race between `WinHttpRequestStream.WriteAsync` and `WinHttpRequestStream.Dispose` that can lead to AV.
A race between
WinHttpRequestStream.WriteAsyncandWinHttpRequestStream.Disposecan lead toDisposeunpinning the buffer forwarded toWinHttp, which can potentially lead toAccessViolationException:runtime/src/libraries/System.Net.Http.WinHttpHandler/src/System/Net/Http/WinHttpRequestStream.cs
Line 254 in 9fa1235
This has been fixed in dotnet/corefx#6500 for
WinHttpResponseStream, this PR is applying the same fix forWinHttpRequestStream.