labath 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:
> 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.

  rG LLVM Github Monorepo


lldb-commits mailing list

Reply via email to