forked from OSchip/llvm-project
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:
parent
67f36bd0d8
commit
a03b9389ca
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue