You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Possibly incorrect fd assertion in pal_utilities.h #131506
Is incorrect because the value of _SC_OPEN_MAX can change during execution via setrlimit, and other processes can set your rlimit so it can change even if the application code never changes it. I think it should be simplified to assert(0 <= fd). As a bonus, that would probably make it possible to enable the assertion on WASI.
The assertion should only reject definitely-invalid fds like -1. The linux kernel's maximum valid FD is currently 1024*1024 but I wouldn't personally hard-code that into a runtime assertion.
Actual behavior
Any valid FD over the current rlimit will cause this assertion to fail.
Activity
dotnet-policy-service commentedon Jul 29, 2026
Tagging subscribers to this area: @dotnet/area-system-io
See info in area-owners.md if you want to be subscribed.
Fix Unix file descriptor assertion (#132136)