not working on the revision 350084


I was trying to test the ‘’ checker with this simple code snippet;

1 #include <stdio.h>
2 #include <stdlib.h>
4 int main(int argc, char** argv){
5 int i;
6 int *a = malloc(sizeof(int) * 10);
7 if (!a) return -1;
8 for (i = 0; i < 11; i++) { //< supposed to find here
9 a[i] = i;
10 }
11 free(a);
12 return 0;
13 }

I ran the analyzer with enabling ‘’ (scan-build -o . -enable-checker clang bo.c -O0 -g), but either it does not work or apparently it concluded there is no problem.

scan-build -o . -enable-checker clang bo.c -O0 -g
scan-build: Using ‘/home/gwangmu/opt/llvm/install/bin/clang-8’ for static analysis
scan-build: Removing directory ‘/home/gwangmu/Scratch/vuln-tests/bo/2019-02-12-202738-6126-1’ because it contains no reports.
scan-build: No bugs found.

I searched for material or articles where this checker was used, but they are quite rare and also no similar problem cannot be found. Was the command running the analyzer not configured well, or is there any CMake flag that I need to set before building the analyzer to use alpha checkers?

Gwangmu Lee.