Skip to content

Commit 36a02e0

Browse files
committed
Make sure the exe_ctx passed to ClangUserExpression::Execute has a valid thread.
<rdar://problem/15949113> llvm-svn: 202561
1 parent 49f906a commit 36a02e0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

lldb/source/Expression/ClangUserExpression.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -763,6 +763,12 @@ ClangUserExpression::Execute (Stream &error_stream,
763763
// expression, it's quite convenient to have these logs come out with the STEP log as well.
764764
Log *log(lldb_private::GetLogIfAnyCategoriesSet (LIBLLDB_LOG_EXPRESSIONS | LIBLLDB_LOG_STEP));
765765

766+
if (!exe_ctx.HasThreadScope())
767+
{
768+
error_stream.Printf("ClangUserExpression::Execute called with no thread selected.");
769+
return eExecutionSetupError;
770+
}
771+
766772
if (m_jit_start_addr != LLDB_INVALID_ADDRESS || m_can_interpret)
767773
{
768774
lldb::addr_t struct_address = LLDB_INVALID_ADDRESS;

0 commit comments

Comments
 (0)