Return codes of libc functions are checked for errors only in debug mode. #34966
Labels
C-bug
Category: This is a bug.
C-enhancement
Category: An issue proposing an enhancement or a PR with one.
I-unsound
Issue: A soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundness
T-libs-api
Relevant to the library API team, which will review and decide on the PR/issue.
In libstd/sys/unix there are numerous cases where return code is checked for
error using following pattern:
That means, that error checking is performed only when compiled in
non-optimized mode or after explicitly enabling debug assertions. This is a
little bit worrying, especially when used on platforms where those functions
can indeed fail and break safety.
The text was updated successfully, but these errors were encountered: