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
50 if (Options::WriteAnder() == "ir_annotator")
51 {
53 }
54
56 SVFIRBuilder builder(svfModule);
57 SVFIR* pag = builder.build();
58
59
60 std::unique_ptr<LeakChecker> saber;
61
63 saber = std::make_unique<LeakChecker>();
64 else if(Options::FileCheck())
65 saber = std::make_unique<FileChecker>();
66 else if(Options::DFreeCheck())
67 saber = std::make_unique<DoubleFreeChecker>();
68 else
69 saber = std::make_unique<LeakChecker>(); // if no checker is specified, we use leak checker as the default one.
70
71 saber->runOnModule(pag);
73
74
75 return 0;
76
77}
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:129
static void preProcessBCs(std::vector< std::string > &moduleNameVec)
static SVFModule * buildSVFModule(Module &mod)
static const Option< bool > DFreeCheck
double free checker, Default: false
Definition Options.h:258
static const Option< bool > FileCheck
file open close checker, Default: false
Definition Options.h:256
static const Option< std::string > WriteAnder
Definition Options.h:212
static const Option< bool > MemoryLeakCheck
memory leak check, Default: false
Definition Options.h:254
llvm::IRBuilder IRBuilder
Definition BasicTypes.h:74