The project aims to extend GCC’s static analyzer to support reporting warnings for “misuse” of POSIX FD APIs such as double-close, leakage, access mode mismatch etc. by implementing the state machine that checks such misuse. Also, the project aims to add three attributes for use on functions that work with file descriptors
The static analyzer can now recognize functions open, close, read, write, creat, dup, dup2 and dup3 and report their misuse accordingly.
The project added five new warnings to GCC relating to misuse of file descriptors