[Lldb-commits] [PATCH] D71003: [lldb/DWARF] Switch to llvm location list parser

David Blaikie via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Dec 4 08:46:14 PST 2019


dblaikie added inline comments.


================
Comment at: lldb/source/Expression/DWARFExpression.cpp:2829
+    if (!loc)
+      LLDB_LOG_ERROR(log, loc.takeError(), "{0}");
+    if (loc->Range) {
----------------
labath wrote:
> labath wrote:
> > dblaikie wrote:
> > > Does LLDB_LOG_ERROR stop the program? If not, then the next line ("if (loc->Range)" will invoke UB when it tries to dereference the "loc" when it is unset.
> > It doesn't. You're right, there should be a return here, just let me see if I can tickle this into exploding.
> It turns out triggering this was pretty hard, because the main source of these errors is a failed indirect address resolution, but our callback never returned any errors. I've now fixed it to return errors and included an additional test.
Looks great!

That's about all the thoughts I have on the patch - will leave the rest to LLDB developers.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71003





More information about the lldb-commits mailing list