[PATCH] D122150: [clang][analyzer] Add checker for bad use of 'errno'.

Gabor Marton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 12 07:51:41 PDT 2022


martong added a comment.

In D122150#3408156 <https://reviews.llvm.org/D122150#3408156>, @balazske wrote:

> This errno check will work if a state split is added at every standard function that may set `errno` at failure. (The success and failure branches have different //errno check state//, and probably different return value for the function.) Probably this is too many state splits. But a correct program should have anyway checks for the return value that make the same state splits.

I think this is a good initiative and valuable work. You might be right about the too many state splits, however, we should measure this empirically. We should have a measurement on opensource projects to highlight peak memory usage and runtime discrepancies compared to the baseline. It might turn out that we indeed have to create a list of functions on which we are allowed to do the state split. Also, would be useful to evaluate the new reports.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122150/new/

https://reviews.llvm.org/D122150



More information about the cfe-commits mailing list