[clang] [clang][analyzer] Model more getline/getdelim pre and postconditions (PR #83027)

Balázs Kéri via cfe-commits cfe-commits at lists.llvm.org
Thu Mar 7 08:55:03 PST 2024


balazske wrote:

`StreamChecker` still does not check for all possible NULL pointer errors. At `fread` and `fwrite` for example there is no check for NULL buffer pointer. The reason is that these are checked in `StdLibraryFunctionsChecker`. Probably it would be better to add the checks for preconditions to that checker instead. Buffer size conditions for `fread` and `fwrite` are already checked only in that checker. (Or add all other checks to `StreamChecker` too.) (Goal of `StreamChecker` was more to check the stream state related things. Probably even the buffer invalidations could be moved into the other checker, and there are more functions where the invalidation code can be used.)

https://github.com/llvm/llvm-project/pull/83027


More information about the cfe-commits mailing list