dotnet / dotnet/dotnet-api-docs
Array.Resize underdocumented.
- Dominant language
- C#
- Stars
- 949
- Forks
- 1.7k
- Avg merge
- 3d 27m
- Merged PRs (30d)
- 49
Description
Array.Resize does not document behaviour in case of out-of-memory.
While a reasonable expectation could be it leaves the old array untouched and raise an exception, nothing of the kind is documented/promised in https://github.com/dotnet/dotnet-api-docs/blob/29b3cce4a0730de1c2473970535b7fbefabf6dce/xml/System/Array.xml#L6543.
Lacking such documentation, OOM is UB. That is not usable quality of an API contract.
Perhaps MS internal would also like a pointer to this issue, to investigate how this omission from API spec was even possible, how it could go unnoticed/unfixed for all this time, to prevent similar mistakes in the future.
Contributor guide
Assessment
This issue has not been assessed yet.