Static Value-Flow Analysis
DoubleFreeChecker.h
Go to the documentation of this file.
1 //===- DoubleFreeChecker.h -- Checking double-free errors---------------------//
2 //
3 // SVF: Static Value-Flow Analysis
4 //
5 // Copyright (C) <2013-> <Yulei Sui>
6 //
7 
8 // This program is free software: you can redistribute it and/or modify
9 // it under the terms of the GNU Affero General Public License as published by
10 // the Free Software Foundation, either version 3 of the License, or
11 // (at your option) any later version.
12 
13 // This program is distributed in the hope that it will be useful,
14 // but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 // GNU Affero General Public License for more details.
17 
18 // You should have received a copy of the GNU Affero General Public License
19 // along with this program. If not, see <http://www.gnu.org/licenses/>.
20 //
21 //===----------------------------------------------------------------------===//
22 
23 /*
24  * DoubleFreeChecker.h
25  *
26  * Created on: Apr 24, 2014
27  * Author: Yulei Sui
28  */
29 
30 #ifndef DOUBLEFREECHECKER_H_
31 #define DOUBLEFREECHECKER_H_
32 
33 #include "SABER/LeakChecker.h"
34 
35 namespace SVF
36 {
37 
43 {
44 
45 public:
48  {
49  }
50 
53  {
54  }
55 
57  virtual bool runOnModule(SVFIR* pag) override
58  {
60  analyze(pag->getModule());
61  return false;
62  }
63 
65  void reportBug(ProgSlice* slice) override;
66 
67 
69  void testsValidation(ProgSlice* slice);
70  void validateSuccessTests(ProgSlice* slice, const SVFFunction* fun);
71  void validateExpectedFailureTests(ProgSlice* slice, const SVFFunction* fun);
72 };
73 
74 } // End namespace SVF
75 
76 #endif /* DOUBLEFREECHECKER_H_ */
void testsValidation(ProgSlice *slice)
Validate test cases for regression test purpose.
void validateSuccessTests(ProgSlice *slice, const SVFFunction *fun)
virtual ~DoubleFreeChecker()
Destructor.
void validateExpectedFailureTests(ProgSlice *slice, const SVFFunction *fun)
virtual bool runOnModule(SVFIR *pag) override
We start from here.
void reportBug(ProgSlice *slice) override
Report file/close bugs.
DoubleFreeChecker()
Constructor.
SVFModule * getModule()
Definition: SVFIR.h:161
virtual void analyze(SVFModule *module)
Start analysis here.
Definition: SrcSnkDDA.cpp:61
for isBitcode
Definition: BasicTypes.h:68