Static Value-Flow Analysis
Loading...
Searching...
No Matches
Functions
saber.cpp File Reference
#include "SVF-LLVM/LLVMUtil.h"
#include "SVF-LLVM/SVFIRBuilder.h"
#include "SABER/LeakChecker.h"
#include "SABER/FileChecker.h"
#include "SABER/DoubleFreeChecker.h"
#include "Util/CommandLine.h"
#include "Util/Options.h"
#include "Util/Z3Expr.h"

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 42 of file saber.cpp.

43{
44
45 std::vector<std::string> moduleNameVec;
47 argc, argv, "Source-Sink Bug Detector", "[options] <input-bitcode...>"
48 );
49
52 SVFIR* pag = builder.build();
53
54
55 std::unique_ptr<LeakChecker> saber;
56
58 saber = std::make_unique<LeakChecker>();
59 else if(Options::FileCheck())
60 saber = std::make_unique<FileChecker>();
61 else if(Options::DFreeCheck())
62 saber = std::make_unique<DoubleFreeChecker>();
63 else
64 saber = std::make_unique<LeakChecker>(); // if no checker is specified, we use leak checker as the default one.
65
66 saber->runOnModule(pag);
68
69
70 return 0;
71
72}
static std::vector< std::string > parseOptions(int argc, char *argv[], std::string description, std::string callFormat)
Definition CommandLine.h:75
static void releaseLLVMModuleSet()
Definition LLVMModule.h:138
static void buildSVFModule(Module &mod)
static const Option< bool > DFreeCheck
double free checker, Default: false
Definition Options.h:259
static const Option< bool > FileCheck
file open close checker, Default: false
Definition Options.h:257
static const Option< bool > MemoryLeakCheck
memory leak check, Default: false
Definition Options.h:255
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74