This is gcc plugin for dump AST tree and search possible null pointers.
Version 1.0 Date: 2015-06-22
- gcc 5 with plugin includes. (gcc-5-plugin) For older gcc build possible, but need change make file.
- automake/autoconf.
- gcc 5 / g++ 5 or older.
- Dump AST tree from gcc.
- Search missing basic null pointer checks for function input parameters.
- Dont check parameters with attribute NONNULL.
- In future probably other checks...
- Run build.sh
- You will get paranucker.so for gcc binary and cxxparanucker.so for g++ binary
In directory examples present two examples one for C++ and other for C.
Paranoid null checker support one plugin paramater named -fplugin-arg-paranucker-command or -fplugin-arg-cxxparanucker-command depend what you using C or C++
Example: gcc-5 -fplugin=../paranucker.so -fplugin-arg-paranucker-command=detectnullpointers
Known parameter values:
name | action |
---|---|
parse | silently parse AST |
dump | dump whole AST |
smalldump | small AST dump without indention |
memoryusage | show how many nodes parsed |
dumpunsupported | dump nodes what cant be parsed |
findargs | dump functions and argument names what can be checked |
detectnullpointers | search null pointers |
dumpnullpointers | search null pointers and dump some debug info |
Readme on russian README.ru.md