summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/SystemRuntime
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2016-10-27 23:52:46 +0000
committerJason Molenda <jmolenda@apple.com>2016-10-27 23:52:46 +0000
commited2977fabe45764608ac82d7239a6e08d575a781 (patch)
tree26d0ec8dce75b1c2c14d14d6c50e5102a43d62b2 /lldb/source/Plugins/SystemRuntime
parentaea899e2a097375118e7b1726247015b79df0379 (diff)
downloadbcm5719-llvm-ed2977fabe45764608ac82d7239a6e08d575a781.tar.gz
bcm5719-llvm-ed2977fabe45764608ac82d7239a6e08d575a781.zip
Check that we got back an object from MakeFunctionCaller
before we call through it. <rdar://problem/28979705> llvm-svn: 285369
Diffstat (limited to 'lldb/source/Plugins/SystemRuntime')
-rw-r--r--lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp2
-rw-r--r--lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp2
-rw-r--r--lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp2
-rw-r--r--lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp
index a4d73eea03c..9d0f0dace3d 100644
--- a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp
+++ b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetItemInfoHandler.cpp
@@ -188,7 +188,7 @@ lldb::addr_t AppleGetItemInfoHandler::SetupGetItemInfoFunction(
get_item_info_caller = m_get_item_info_impl_code->MakeFunctionCaller(
get_item_info_return_type, get_item_info_arglist,
thread.shared_from_this(), error);
- if (error.Fail()) {
+ if (error.Fail() || get_item_info_caller == nullptr) {
if (log)
log->Printf("Error Inserting get-item-info function: \"%s\".",
error.AsCString());
diff --git a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp
index 452d319860d..38bf3368c71 100644
--- a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp
+++ b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp
@@ -192,7 +192,7 @@ lldb::addr_t AppleGetPendingItemsHandler::SetupGetPendingItemsFunction(
m_get_pending_items_impl_code->MakeFunctionCaller(
get_pending_items_return_type, get_pending_items_arglist,
thread_sp, error);
- if (error.Fail()) {
+ if (error.Fail() || get_pending_items_caller == nullptr) {
if (log)
log->Printf("Failed to install pending-items introspection function "
"caller: %s.",
diff --git a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
index fc3da32d09c..3994c2817e6 100644
--- a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
+++ b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetQueuesHandler.cpp
@@ -205,7 +205,7 @@ AppleGetQueuesHandler::SetupGetQueuesFunction(Thread &thread,
Error error;
get_queues_caller = m_get_queues_impl_code_up->MakeFunctionCaller(
get_queues_return_type, get_queues_arglist, thread_sp, error);
- if (error.Fail()) {
+ if (error.Fail() || get_queues_caller == nullptr) {
if (log)
log->Printf(
"Could not get function caller for get-queues function: %s.",
diff --git a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp
index d3ab0fac30a..4ed43e5e6e5 100644
--- a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp
+++ b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetThreadItemInfoHandler.cpp
@@ -203,7 +203,7 @@ lldb::addr_t AppleGetThreadItemInfoHandler::SetupGetThreadItemInfoFunction(
m_get_thread_item_info_impl_code->MakeFunctionCaller(
get_thread_item_info_return_type, get_thread_item_info_arglist,
thread_sp, error);
- if (error.Fail()) {
+ if (error.Fail() || get_thread_item_info_caller == nullptr) {
if (log)
log->Printf("Failed to install get-thread-item-info introspection "
"caller: %s.",
OpenPOWER on IntegriCloud