Closed u201111476 closed 3 months ago
I have a cpp source file,whose contents are as below:
#include<stdio.h> #include<stdlib.h> #include <iostream> using namespace std; int main(int argc, char *argv[]) { char* buf=new char; *buf='c'; cout<<buf<<endl; return 0; }
then I use infer capture -- clang++ main.cpp and infer analyze --bufferoverrun --pulse,but infer does not check out the obvious memory leak caused by new,what should I do to check out this real flaw?
infer capture -- clang++ main.cpp
infer analyze --bufferoverrun --pulse
I have a cpp source file,whose contents are as below:
then I use
infer capture -- clang++ main.cpp
andinfer analyze --bufferoverrun --pulse
,but infer does not check out the obvious memory leak caused by new,what should I do to check out this real flaw?