/root/infer/examples/Hello.java:4: error: NULL_DEREFERENCE
object s last assigned on line 3 could be null and is dereferenced at line 4
root@f71395f22159:~/infer/examples#
Android项目
root@f71395f22159:~/infer/examples/android_hello# gradle clean
:app:clean
BUILD SUCCESSFUL
Total time: 6.522 secs
This build could be faster, please consider using the Gradle Daemon: http://gradle.org/docs/2.5/userguide/gradle_daemon.html
root@f71395f22159:~/infer/examples/android_hello# infer -- gradle build
08:11:22.183 [ERROR] [org.gradle.api.Project] /root/infer/examples/android_hello/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.0.0/res/drawable-hdpi-v4/abc_spinner_mtrl_am_alpha.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
08:11:36.470 [ERROR] [org.gradle.api.Project] /root/infer/examples/android_hello/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/22.0.0/res/drawable-hdpi-v4/abc_spinner_mtrl_am_alpha.9.png: libpng warning: iCCP: Not recognizing known sRGB profile that has been edited
Starting analysis (Infer version git-1356fd331f3db485be9ee38446a7389c9310d344)
Analysis done
5 files analyzed
/root/infer/examples/android_hello/app/src/main/java/infer/inferandroidexample/MainActivity.java:20: error: NULL_DEREFERENCE
object s last assigned on line 19 could be null and is dereferenced at line 20
/root/infer/examples/android_hello/app/src/main/java/infer/inferandroidexample/MainActivity.java:37: error: RESOURCE_LEAK
resource acquired to fis by call to FileOutputStream(...) at line 34 is not released after line 37
root@f71395f22159:~/infer/examples/android_hello#
hello.c:5: error: NULL_DEREFERENCE
pointer s last assigned on line 4 could be null and is dereferenced at line 5, column 3
C 项目
root@f71395f22159:~/infer/examples/c_hello# make clean
rm -rf example.o
root@f71395f22159:~/infer/examples/c_hello# infer -- make
cc -c example.c
Starting analysis (Infer version git-1356fd331f3db485be9ee38446a7389c9310d344)
Analysis done
1 file analyzed
example.c:22: error: NULL_DEREFERENCE
pointer max last assigned on line 21 could be null and is dereferenced at line 22, column 10
example.c:36: error: NULL_DEREFERENCE
pointer joe last assigned on line 35 could be null and is dereferenced by call to get_age() at line 36, column 10
example.c:45: error: RESOURCE_LEAK
resource acquired to fd by call to open() at line 41, column 12 is not released after line 45, column 5
example.c:51: error: MEMORY_LEAK
memory dynamically allocated to p by call to malloc() at line 51, column 14 is not reachable after line 51, column 3
example.c:57: error: MEMORY_LEAK
memory dynamically allocated to p by call to malloc() at line 56, column 14 is not reachable after line 57, column 3
root@f71395f22159:~/infer/examples/c_hello#