diff options
| author | Jason Molenda <jmolenda@apple.com> | 2010-12-15 04:20:25 +0000 |
|---|---|---|
| committer | Jason Molenda <jmolenda@apple.com> | 2010-12-15 04:20:25 +0000 |
| commit | b690fbbaec7629824601cc5aaf3e650795824621 (patch) | |
| tree | f69d2986a04aa65002c35b6007c644e53eca39e2 /lldb/source/Core/Mangled.cpp | |
| parent | 357d0f3cafc476578bdfa7c75e97a05b3f9ac1cd (diff) | |
| download | bcm5719-llvm-b690fbbaec7629824601cc5aaf3e650795824621.tar.gz bcm5719-llvm-b690fbbaec7629824601cc5aaf3e650795824621.zip | |
Fix a crash on some platforms where a dSYM for a system library lists a DW_AT_mips_linkage_name for
a non-mangled function - we pass the non mangled string down through abi::__cxa_demangle and it
crashes. Usually passing non mangled strings to abi::__cxa_demangle works out fine but not
always, apparently.
llvm-svn: 121834
Diffstat (limited to 'lldb/source/Core/Mangled.cpp')
| -rw-r--r-- | lldb/source/Core/Mangled.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lldb/source/Core/Mangled.cpp b/lldb/source/Core/Mangled.cpp index 6a55ebc5604..3e3a6a8b5ed 100644 --- a/lldb/source/Core/Mangled.cpp +++ b/lldb/source/Core/Mangled.cpp @@ -143,7 +143,8 @@ Mangled::GetDemangledName () const // We already know mangled is valid from the above check, // lets just make sure it isn't empty... const char * mangled = m_mangled.AsCString(); - if (mangled[0]) + // Don't bother running anything that doesn't start with _Z through the demangler + if (mangled[0] != '\0' && mangled[0] == '_' && mangled[1] == 'Z') { // Since demangling can be a costly, and since all names that go // into a ConstString (like our m_mangled and m_demangled members) |

