[all-commits] [llvm/llvm-project] 2eefd1: [clang][analyzer] No end-of-file when seek to file...
Balázs Kéri via All-commits
all-commits at lists.llvm.org
Fri Jun 30 01:30:28 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 2eefd19613b8ea1f4cf59a4f0321bdc5f5ab0841
https://github.com/llvm/llvm-project/commit/2eefd19613b8ea1f4cf59a4f0321bdc5f5ab0841
Author: Balázs Kéri <balazs.keri at ericsson.com>
Date: 2023-06-30 (Fri, 30 Jun 2023)
Changed paths:
M clang/lib/StaticAnalyzer/Checkers/StreamChecker.cpp
M clang/test/Analysis/stream-error.c
Log Message:
-----------
[clang][analyzer] No end-of-file when seek to file begin.
If `fseek` is used with 0 position and SEEK_SET it sets the position
to the start of the file. This should not cause FEOF (end of file) error.
The case of an empty file is not handled for simplification.
It is not exactly defined in what cases `fseek` produces the different
error states. Normally feof should not happen at all because it is
possible to set the position after the end of file, but previous tests
showed that still feof (and any other error cases) can happen.
Reviewed By: donat.nagy
Differential Revision: https://reviews.llvm.org/D153363
More information about the All-commits
mailing list