[Lldb-commits] [PATCH] D154907: [LLDB] Fix buffer overflow problem in DWARFExpression::Evaluate (2nd attempt)

David Blaikie via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 24 20:21:20 PDT 2023


dblaikie added a subscriber: jmorse.
dblaikie added a comment.

Simple clang example that produces this invalid DWARF:

  void b(double);
  void c();
  void e(double e) {
    c();
    b(e);
  }

  $ clang-tot x.ii -g -c -o - -O3 | llvm-dwarfdump-tot - | grep DW_OP_deref_size
                       [0x0000000000000006, 0x0000000000000016): DW_OP_breg7 RSP+0, DW_OP_deref_size 0x10, DW_OP_stack_value)

This seems to be created here: https://github.com/llvm/llvm-project/blob/dd84f5f91c6b234a2f188b6acf8557cae81b8a53/llvm/lib/CodeGen/LiveDebugValues/InstrRefBasedImpl.cpp#L1281 - so I'll file a bug for @jmorse to take a look at, perhaps.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154907/new/

https://reviews.llvm.org/D154907



More information about the lldb-commits mailing list