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.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71003/new/
https://reviews.llvm.org/D71003
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits