Uh oh!
There was an error while loading. Please reload this page.
[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?
antonfirsov
commented
Apr 30, 2024
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.
antonfirsov
commented
May 1, 2024
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. |
antonfirsov
commented
May 7, 2024
/azp run runtime-libraries-coreclr outerloop |
|
Azure Pipelines successfully started running 1 pipeline(s). |
antonfirsov
commented
May 8, 2024
All test failures are unrelated, merging. |
…#101725) Fixes a race between `WinHttpRequestStream.WriteAsync` and `WinHttpRequestStream.Dispose` that can lead to AV.
antonfirsov
commented
May 10, 2024
/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.