apisan icon indicating copy to clipboard operation
apisan copied to clipboard

False positive in alias analyze of cpair

Open Jason2031 opened this issue 6 years ago • 1 comments

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.

Jason2031 avatar Jul 27 '18 02:07 Jason2031

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.

insuyun avatar Aug 04 '18 01:08 insuyun