Don't crash when evaluating a DWARF expression has a DW_OP_bra with nothing on the value stack.

<rdar://problem/18919125>

llvm-svn: 228729
This commit is contained in:
Greg Clayton 2015-02-10 19:43:15 +00:00
parent 67f36bd0d8
commit a03b9389ca
1 changed files with 7 additions and 0 deletions

View File

@ -2198,6 +2198,13 @@ DWARFExpression::Evaluate
// constant.
//----------------------------------------------------------------------
case DW_OP_bra:
if (stack.empty())
{
if (error_ptr)
error_ptr->SetErrorString("Expression stack needs at least 1 item for DW_OP_bra.");
return false;
}
else
{
tmp = stack.back();
stack.pop_back();