ROSE  0.11.98.0
UninitVarTag.h
1 #ifndef ROSE_BinaryAnalysis_ModelChecker_UninitVarTag_H
2 #define ROSE_BinaryAnalysis_ModelChecker_UninitVarTag_H
3 #include <featureTests.h>
4 #ifdef ROSE_ENABLE_BINARY_ANALYSIS
5 
6 #include <Rose/BinaryAnalysis/ModelChecker/Tag.h>
7 #include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/Types.h>
8 #include <Rose/BinaryAnalysis/Variables.h>
9 
10 namespace Rose {
11 namespace BinaryAnalysis {
12 namespace ModelChecker {
13 
15 class UninitVarTag: public Tag {
16 public:
17  using Ptr = UninitVarTagPtr;
18 
19 private:
20  const TestMode testMode_; // may or must, but not off
21  const SgAsmInstruction *insn_; // instruction where the oob access occurs (optional)
22  const InstructionSemantics::BaseSemantics::SValuePtr addr_; // memory address that is accessed
23  const Variables::StackVariable variable_; // variable that was read before being written
24  const AddressInterval variableLocation_; // location and size of stack variable in memory
25 
26 protected:
27  UninitVarTag() = delete;
30  const Variables::StackVariable &variable, const AddressInterval &variableLocation);
31 
32  UninitVarTag(const UninitVarTag&) = delete;
33 
34 public:
35  ~UninitVarTag();
36 
43  static Ptr instance(size_t nodeStep, TestMode, SgAsmInstruction*,
45  const Variables::StackVariable &variable, const AddressInterval &variableLocation);
46 
47 public:
48  virtual std::string name() const override;
49  virtual std::string printableName() const override;
50  virtual void print(std::ostream&, const std::string &prefix) const override;
51  virtual void toYaml(std::ostream&, const std::string &prefix) const override;
52 };
53 
54 } // namespace
55 } // namespace
56 } // namespace
57 
58 #endif
59 #endif
virtual void print(std::ostream &, const std::string &prefix) const override
Print multi-line information about the tag.
Tag that describes an out-of-bounds memory access.
Definition: UninitVarTag.h:15
virtual void toYaml(std::ostream &, const std::string &prefix) const override
Print multi-line information about the tag in YAML format.
Base class for machine instructions.
TestMode
Mode by which comparisons are made.
virtual std::string name() const override
Property: Generic name of tag.
Main namespace for the ROSE library.
Information tagged to a path node.
Definition: Tag.h:22
size_t nodeStep() const
Property: Node step.
Binary analysis.
virtual std::string printableName() const override
String to identify this tag.
static Ptr instance(size_t nodeStep, TestMode, SgAsmInstruction *, const InstructionSemantics::BaseSemantics::SValuePtr &addr, const Variables::StackVariable &variable, const AddressInterval &variableLocation)
Allocating constructor.
Description of a local stack variable within a function.
Definition: Variables.h:146