[analyzer][StdLibraryFunctionsChecker] Fix typos in summaries of mmap and mmap64
The fd parameter of ``` void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset) ``` should be constrained to the range [0, IntMax] as that is of type int. Constraining to the range [0, Off_tMax] would result in a crash as that is of a signed type with the value of 0xff..f (-1). The crash would happen when we try to apply the arg constraints. At line 583: assert(Min <= Max), as 0 <= -1 is not satisfied The mmap64 is fixed for the same reason. Reviewed By: martong, vsavchenko Differential Revision: https://reviews.llvm.org/D92307
Loading
Please sign in to comment