ROSE 0.11.145.147
NullDereferenceTag.h
1#ifndef ROSE_BinaryAnalysis_ModelChecker_NullDereferenceTag_H
2#define ROSE_BinaryAnalysis_ModelChecker_NullDereferenceTag_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_MODEL_CHECKER
5
6#include <Rose/BinaryAnalysis/ModelChecker/Tag.h>
7#include <Rose/BinaryAnalysis/InstructionSemantics/BaseSemantics/BasicTypes.h>
8
10
11namespace Rose {
12namespace BinaryAnalysis {
13namespace ModelChecker {
14
16class NullDereferenceTag: public Tag {
17public:
18 using Ptr = NullDereferenceTagPtr;
19
20private:
21 const TestMode testMode_; // may or must, but not off
22 const IoMode ioMode_; // read or write
23 SgAsmInstruction* const insn_; // instruction where the dereference occurs (optional)
24 const InstructionSemantics::BaseSemantics::SValuePtr addr_; // memory address that is considered to be null
25
26protected:
27 NullDereferenceTag() = delete;
28 NullDereferenceTag(size_t nodeStep, TestMode, IoMode, SgAsmInstruction*,
29 const InstructionSemantics::BaseSemantics::SValuePtr &addr);
30public:
31 ~NullDereferenceTag();
32
36 static Ptr instance(size_t nodeStep, TestMode, IoMode, SgAsmInstruction*,
37 const InstructionSemantics::BaseSemantics::SValuePtr &addr);
38
39public:
40 virtual std::string name() const override;
41 virtual std::string printableName() const override;
42 virtual void print(std::ostream&, const std::string &prefix) const override;
43 virtual void toYaml(std::ostream&, const std::string &prefix) const override;
44 virtual Sarif::ResultPtr toSarif(const Sarif::AnalysisPtr&) const override;
45};
46
47} // namespace
48} // namespace
49} // namespace
50
51#endif
52#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 * IoMode(int64_t)
Convert Rose::BinaryAnalysis::FeasiblePath::IoMode enum constant to a string.
const char * TestMode(int64_t)
Convert Rose::BinaryAnalysis::ModelChecker::TestMode enum constant to a string.