[clang] [clang][analyzer] Fix argument invalidations in StreamChecker. (PR #79470)
Balázs Kéri via cfe-commits
cfe-commits at lists.llvm.org
Wed Feb 21 23:58:29 PST 2024
================
@@ -763,6 +779,11 @@ void StreamChecker::evalFreadFwrite(const FnDescription *Desc,
return;
}
+ // At read, invalidate the buffer in any case of error or success,
+ // except if EOF was already present.
+ if (IsFread && (OldSS->ErrorState != ErrorFEof))
+ State = escapeArgs(State, C, Call, {0});
----------------
balazske wrote:
The current solution invalidates the whole buffer (if I think correctly) because the `SVal` of the buffer is passed to `invalidateRegions`. Is there a solution to invalidate a partial buffer (of specific size)?
https://github.com/llvm/llvm-project/pull/79470
More information about the cfe-commits
mailing list