summaryrefslogtreecommitdiffstats
path: root/lldb/include
diff options
context:
space:
mode:
authorSean Callanan <scallanan@apple.com>2010-09-02 00:37:32 +0000
committerSean Callanan <scallanan@apple.com>2010-09-02 00:37:32 +0000
commit8e999e401518b167b3fdc988752a9cef966cd8e8 (patch)
treee5c59f13232e64e2ae2c706bd8a6591dd8d595bd /lldb/include
parent1e424241b4bb120d22ce6801d572934c58f662a7 (diff)
downloadbcm5719-llvm-8e999e401518b167b3fdc988752a9cef966cd8e8.tar.gz
bcm5719-llvm-8e999e401518b167b3fdc988752a9cef966cd8e8.zip
Added code to run pointer validation checks in
expressions. If an expression dereferences an invalid pointer, there will still be a crash - just now the crash will be in the function ___clang_valid_pointer_check(). llvm-svn: 112785
Diffstat (limited to 'lldb/include')
-rw-r--r--lldb/include/lldb/Expression/IRDynamicChecks.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/lldb/include/lldb/Expression/IRDynamicChecks.h b/lldb/include/lldb/Expression/IRDynamicChecks.h
index bb875ae8f5a..e0f8b0a1517 100644
--- a/lldb/include/lldb/Expression/IRDynamicChecks.h
+++ b/lldb/include/lldb/Expression/IRDynamicChecks.h
@@ -132,6 +132,26 @@ public:
//------------------------------------------------------------------
llvm::PassManagerType getPotentialPassManagerType() const;
private:
+ //------------------------------------------------------------------
+ /// A basic block-level pass to find all pointer dereferences and
+ /// validate them before use.
+ //------------------------------------------------------------------
+
+ //------------------------------------------------------------------
+ /// The top-level pass implementation
+ ///
+ /// @param[in] M
+ /// The module currently being processed.
+ ///
+ /// @param[in] BB
+ /// The basic block currently being processed.
+ ///
+ /// @return
+ /// True on success; false otherwise
+ //------------------------------------------------------------------
+ bool FindDataLoads(llvm::Module &M,
+ llvm::BasicBlock &BB);
+
std::string m_func_name; ///< The name of the function to add checks to
DynamicCheckerFunctions &m_checker_functions; ///< The checker functions for the process
};
OpenPOWER on IntegriCloud