projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
de9cab9
)
Guard GetEscapedHostname against a nullptr hostname.
author
Jason Molenda
<jmolenda@apple.com>
Fri, 21 Oct 2016 02:32:08 +0000
(
02:32
+0000)
committer
Jason Molenda
<jmolenda@apple.com>
Fri, 21 Oct 2016 02:32:08 +0000
(
02:32
+0000)
This can happen if you debug an iOS corefile on
a mac, where PlatformPOSIX::GetHostname ends up
not providing a hostname because we're working
with a platform of remote-ios.
llvm-svn: 284799
lldb/source/Utility/ModuleCache.cpp
patch
|
blob
|
history
diff --git
a/lldb/source/Utility/ModuleCache.cpp
b/lldb/source/Utility/ModuleCache.cpp
index
bf76db9
..
ed1e766
100644
(file)
--- a/
lldb/source/Utility/ModuleCache.cpp
+++ b/
lldb/source/Utility/ModuleCache.cpp
@@
-36,6
+36,8
@@
const char *kSymFileExtension = ".sym";
const char *kFSIllegalChars = "\\/:*?\"<>|";
std::string GetEscapedHostname(const char *hostname) {
+ if (hostname == nullptr)
+ hostname = "unknown";
std::string result(hostname);
size_t size = result.size();
for (size_t i = 0; i < size; ++i) {