apisan
apisan copied to clipboard
False positive in alias analyze of cpair
Hi jakkdu. It seems like apisan doesn't support alias analyze of cpair checker. Consider the following code:
#include <stdio.h>
void good1(){
int* a=(int*)malloc(sizeof(int));
// do something...
free(a);
}
// other similar malloc-free pattern omitted...
void goodx(){
int* a=(int*)malloc(sizeof(int));
int* b=a;
// do something...
free(b);
}
Apisan makes complaints that malloc-free pattern in goodx
is a potential bug.
Sorry, Jason. I was too busy. I just checked the cpair one. Could you give me the full code that you test? I think goodx seems not considered as potential bug. Thanks.