ROSE 0.11.145.147
UninitializedVariableTag.h
1#ifndef ROSE_BinaryAnalysis_ModelChecker_UninitializedVariableTag_H
2#define ROSE_BinaryAnalysis_ModelChecker_UninitializedVariableTag_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_MODEL_CHECKER
5
6#include <Rose/BinaryAnalysis/ModelChecker/Tag.h>
7#include <Rose/BinaryAnalysis/ModelChecker/Variables.h>
8#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/BasicTypes.h>
9#include <Rose/BinaryAnalysis/Variables.h>
10
11namespace Rose {
12namespace BinaryAnalysis {
13namespace ModelChecker {
14
16class UninitializedVariableTag: public Tag {
17public:
18 using Ptr = UninitializedVariableTagPtr;
19
20private:
21 const TestMode testMode_; // may or must, but not off
22 const SgAsmInstruction *insn_; // instruction where the oob access occurs (optional)
23 const InstructionSemantics::BaseSemantics::SValuePtr addr_; // memory address that is accessed
24 const FoundVariable variable_; // variable that was read before being written
25
26protected:
27 UninitializedVariableTag() = delete;
28 UninitializedVariableTag(size_t nodeStep, TestMode, SgAsmInstruction*,
29 const InstructionSemantics::BaseSemantics::SValuePtr &addr,
30 const FoundVariable &variable);
31
32 UninitializedVariableTag(const UninitializedVariableTag&) = delete;
33
34public:
35 ~UninitializedVariableTag();
36
43 static Ptr instance(size_t nodeStep, TestMode, SgAsmInstruction*,
44 const InstructionSemantics::BaseSemantics::SValuePtr &addr, const FoundVariable &variable);
45
46public:
47 virtual std::string name() const override;
48 virtual std::string printableName() const override;
49 virtual void print(std::ostream&, const std::string &prefix) const override;
50 virtual void toYaml(std::ostream&, const std::string &prefix) const override;
51 Sarif::ResultPtr toSarif(const Sarif::AnalysisPtr&) const override;
52};
53
54} // namespace
55} // namespace
56} // namespace
57
58#endif
59#endif
Base class for machine instructions.
Sawyer::SharedPointer< Node > Ptr
Reference counting pointer.
void print(const StackVariables &, const Partitioner2::PartitionerConstPtr &, std::ostream &out, const std::string &prefix="")
Print info about multiple local variables.
The ROSE library.
const char * TestMode(int64_t)
Convert Rose::BinaryAnalysis::ModelChecker::TestMode enum constant to a string.