aboutsummaryrefslogtreecommitdiff
path: root/lldb/packages/Python/lldbsuite/test/lock.py
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2020-03-16 18:11:36 -0700
committerVedant Kumar <vsk@apple.com>2020-03-17 12:51:49 -0700
commit526c51e6fdc834b703e14ca851a8c95c7f1c9b2f (patch)
treef67da58ed002afac1bcff980e3a2e6a291480f05 /lldb/packages/Python/lldbsuite/test/lock.py
parent5555c04ba9f963165e462545d2da2dcb1625972e (diff)
downloadllvm-526c51e6fdc834b703e14ca851a8c95c7f1c9b2f.zip
llvm-526c51e6fdc834b703e14ca851a8c95c7f1c9b2f.tar.gz
llvm-526c51e6fdc834b703e14ca851a8c95c7f1c9b2f.tar.bz2
[DwarfDebug] Fix an assertion error when emitting call site info that combines two DW_OP_stack_values
When compiling ``` struct S { float w; }; void f(long w, long b); void g(struct S s) { int w = s.w; f(w, w*4); } ``` I get Assertion failed: ((!CombinedExpr || CombinedExpr->isValid()) && "Combined debug expression is invalid"). That's because we combine two epxressions that both end in DW_OP_stack_value: ``` (lldb) p Expr->dump() !DIExpression(DW_OP_LLVM_convert, 32, DW_ATE_signed, DW_OP_LLVM_convert, 64, DW_ATE_signed, DW_OP_stack_value) (lldb) p Param.Expr->dump() !DIExpression(DW_OP_constu, 4, DW_OP_mul, DW_OP_LLVM_convert, 32, DW_ATE_signed, DW_OP_LLVM_convert, 64, DW_ATE_signed, DW_OP_stack_value) (lldb) p CombinedExpr->isValid() (bool) $0 = false (lldb) p CombinedExpr->dump() !DIExpression(4097, 32, 5, 4097, 64, 5, 16, 4, 30, 4097, 32, 5, 4097, 64, 5, 159, 159) ``` I believe that in this particular case combining two stack values is safe, but I didn't want to sink the special handling into DIExpression::append() because I do want everyone to think about what they are doing. Patch by Adrian Prantl. Fixes PR45181. rdar://problem/60383095 Differential Revision: https://reviews.llvm.org/D76164
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lock.py')
0 files changed, 0 insertions, 0 deletions