[Lldb-commits] [PATCH] D127016: [lldb] Prevent crash due to reading memory from page zero.
Chelsea Cassanova via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Jun 3 16:23:58 PDT 2022
cassanova added inline comments.
================
Comment at: lldb/source/Commands/CommandObjectMemory.cpp:597-598
+ ABISP abi;
+ if (Process * proc = m_exe_ctx.GetProcessPtr())
+ abi = proc->GetABI();
+
----------------
kastiglione wrote:
> Should `memory read` emit an error if there's no process (and no core file or any other memory to read from)?
Right now running `memory read` without a target indicates that there's no target. The input that can cause lldb to crash is `x 0` (such as `./bin/lldb -o 'x 0' ./bin/count`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D127016/new/
https://reviews.llvm.org/D127016
More information about the lldb-commits
mailing list