[PATCH] D92307: [analyzer][StdLibraryFunctionsChecker] Fix typos in summaries of mmap and mmap64
Valeriy Savchenko via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 30 05:11:38 PST 2020
vsavchenko accepted this revision.
vsavchenko added a comment.
In D92307#2422603 <https://reviews.llvm.org/D92307#2422603>, @martong wrote:
> In D92307#2422468 <https://reviews.llvm.org/D92307#2422468>, @vsavchenko wrote:
>
>> That's a good fix!
>> How did this happen though that max value of `off_t` was even used for `fd`. Seems pretty odd!
>
> I used a semi-automated approach to create these summaries from cppcheck <https://github.com/danmar/cppcheck/blob/main/cfg/posix.cfg> : I translated the XML into C++ source code, but could not do the translation for ranges. E.g., `0:` was just simply copied and I had to manually modify the generated C++ code to have the proper range. And that's where I made the wrong index for the param (cppcheck starts from idx 1, here we start from idx 0). Here the 5th param has the `off_t` type, so I thought we have to get the max for `off_t`.
I see, thanks for clarification!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92307/new/
https://reviews.llvm.org/D92307
More information about the cfe-commits
mailing list