Skip to content

fix endless loop in GetActiveUdpListeners#35078

Merged
wfurt merged 1 commit intodotnet:masterfrom
wfurt:ActiveUdpListeners
Apr 17, 2020
Merged

fix endless loop in GetActiveUdpListeners#35078
wfurt merged 1 commit intodotnet:masterfrom
wfurt:ActiveUdpListeners

Conversation

@wfurt
Copy link
Member

@wfurt wfurt commented Apr 16, 2020

Seems like regression caused by #1914. It removed buffer = SafeLocalAllocHandle.LocalAlloc((int)size) from SystemIPGlobalProperties.cs / GetActiveUdpListeners() so when initial allocation fails we never allocate more bytes and we loop endlessly.

Tcp counterpart seems fine.

I originally added some of the test as part of specific unix fixes. But they run fine on Windows as well and I checked and they would catch the regression. So I'm removing the Unix restriction.

fixes #35051

@wfurt wfurt added this to the 5.0 milestone Apr 16, 2020
@wfurt wfurt requested review from a team and jkotas April 16, 2020 22:55
@wfurt wfurt self-assigned this Apr 16, 2020
@ghost
Copy link

ghost commented Apr 16, 2020

Tagging subscribers to this area: @dotnet/ncl
Notify danmosemsft if you want to be subscribed.

Copy link
Member

@jkotas jkotas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Copy link
Member

@stephentoub stephentoub left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Thanks.

@jkotas
Copy link
Member

jkotas commented Apr 17, 2020

@wfurt This was merged with failures introduced by this PR. All PRs are failing with this failure now.

Opened #35111

@wfurt
Copy link
Member Author

wfurt commented Apr 17, 2020

sorry @jkotas . I missed that somehow. I shall not merge late night ;(

@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
@wfurt wfurt deleted the ActiveUdpListeners branch January 7, 2026 19:59
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IPGlobalProperties.GetActiveUdpListeners() hangs in .NET 5 preview 2

4 participants