diff options
author | Balázs Kéri <1.int32@gmail.com> | 2020-05-27 16:23:42 +0200 |
---|---|---|
committer | Balázs Kéri <1.int32@gmail.com> | 2020-05-28 08:21:57 +0200 |
commit | 9081fa20991d101728434b354a96283b26495b71 (patch) | |
tree | e8c95f593135013f3fa2b75aaf8c413316f0ba47 /llvm/lib/Bitcode/Writer/BitcodeWriter.cpp | |
parent | c4990a03c6c347df120c0dbf6039e900889c4a92 (diff) | |
download | llvm-9081fa20991d101728434b354a96283b26495b71.zip llvm-9081fa20991d101728434b354a96283b26495b71.tar.gz llvm-9081fa20991d101728434b354a96283b26495b71.tar.bz2 |
[Analyzer][StreamChecker] Added check for "indeterminate file position".
Summary:
According to the standard, after a `wread` or `fwrite` call the file position
becomes "indeterminate". It is assumable that a next read or write causes
undefined behavior, so a (fatal error) warning is added for this case.
The indeterminate position can be cleared by some operations, for example
`fseek` or `freopen`, not with `clearerr`.
Reviewers: Szelethus, baloghadamsoftware, martong, NoQ, xazax.hun, dcoughlin
Reviewed By: Szelethus
Subscribers: rnkovacs, NoQ, xazax.hun, baloghadamsoftware, szepet, a.sidorin, mikhail.ramalho, Szelethus, donat.nagy, dkrupp, gamesh411, Charusso, martong, ASDenysPetrov, cfe-commits
Tags: #clang
Differential Revision: https://reviews.llvm.org/D80018
Diffstat (limited to 'llvm/lib/Bitcode/Writer/BitcodeWriter.cpp')
0 files changed, 0 insertions, 0 deletions