[Lldb-commits] [lldb] r181636 - Hardened LLDB against NULL conditions being
Sean Callanan
scallanan at apple.com
Fri May 10 14:58:45 PDT 2013
Author: spyffe
Date: Fri May 10 16:58:45 2013
New Revision: 181636
URL: http://llvm.org/viewvc/llvm-project?rev=181636&view=rev
Log:
Hardened LLDB against NULL conditions being
passed to breakpoints.
<rdar://problem/13853205>
Modified:
lldb/trunk/source/Breakpoint/BreakpointLocation.cpp
lldb/trunk/source/Breakpoint/BreakpointOptions.cpp
Modified: lldb/trunk/source/Breakpoint/BreakpointLocation.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointLocation.cpp?rev=181636&r1=181635&r2=181636&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointLocation.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointLocation.cpp Fri May 10 16:58:45 2013
@@ -254,7 +254,10 @@ BreakpointLocation::ConditionSaysStop (E
const char *condition_text = GetConditionText(&condition_hash);
if (!condition_text)
+ {
+ m_user_expression_sp.reset();
return false;
+ }
if (condition_hash != m_condition_hash ||
!m_user_expression_sp ||
Modified: lldb/trunk/source/Breakpoint/BreakpointOptions.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointOptions.cpp?rev=181636&r1=181635&r2=181636&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointOptions.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointOptions.cpp Fri May 10 16:58:45 2013
@@ -162,6 +162,9 @@ BreakpointOptions::HasCallback ()
void
BreakpointOptions::SetCondition (const char *condition)
{
+ if (!condition)
+ condition = "";
+
m_condition_text.assign(condition);
std::hash<std::string> hasher;
m_condition_text_hash = hasher(m_condition_text);
More information about the lldb-commits
mailing list