summaryrefslogtreecommitdiffstats
path: root/lldb
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2015-10-29 00:08:03 +0000
committerJason Molenda <jmolenda@apple.com>2015-10-29 00:08:03 +0000
commitd76b2a42f2d2e913927d7f1a3c4bac8f191070a0 (patch)
tree3149a31abbe350ae23ca1b270b4a0840f7e7a550 /lldb
parent8fe108766f23381fbfbbf23ea3e12c5aed7e4a11 (diff)
downloadbcm5719-llvm-d76b2a42f2d2e913927d7f1a3c4bac8f191070a0.tar.gz
bcm5719-llvm-d76b2a42f2d2e913927d7f1a3c4bac8f191070a0.zip
Static analyzer noticed that a null get_pending_items_caller could
be used. Guard against that. llvm-svn: 251584
Diffstat (limited to 'lldb')
-rw-r--r--lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp
index e484ee33091..97699878f5e 100644
--- a/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp
+++ b/lldb/source/Plugins/SystemRuntime/MacOSX/AppleGetPendingItemsHandler.cpp
@@ -178,7 +178,6 @@ AppleGetPendingItemsHandler::SetupGetPendingItemsFunction (Thread &thread, Value
{
if (log)
log->Printf("No pending-items introspection code found.");
- errors.Printf ("No pending-items introspection code found.");
return LLDB_INVALID_ADDRESS;
}
@@ -202,6 +201,13 @@ AppleGetPendingItemsHandler::SetupGetPendingItemsFunction (Thread &thread, Value
errors.Clear();
+ if (get_pending_items_caller == nullptr)
+ {
+ if (log)
+ log->Printf ("Failed to get get_pending_items_caller.");
+ return LLDB_INVALID_ADDRESS;
+ }
+
// Now write down the argument values for this particular call. This looks like it might be a race condition
// if other threads were calling into here, but actually it isn't because we allocate a new args structure for
// this call by passing args_addr = LLDB_INVALID_ADDRESS...
OpenPOWER on IntegriCloud