[lldb/Commands] Prevent crash due to reading memory from page zero.
authorChelsea Cassanova <sassychels251@gmail.com>
Sat, 4 Jun 2022 00:04:13 +0000 (20:04 -0400)
committerChelsea Cassanova <sassychels251@gmail.com>
Wed, 8 Jun 2022 22:10:41 +0000 (18:10 -0400)
commit0f02dd34f22650d8af0070e7ad21632525e33da8
tree211f62fc375350925d83a27fd4d7dd503e98c090
parentff96d434d0cdc9ba5b367c9776f6dfd95de70a81
[lldb/Commands] Prevent crash due to reading memory from page zero.

Adds a check to ensure that a process exists before attempting to get
its ABI to prevent lldb from crashing due to trying to read from page zero.

Differential revision: https://reviews.llvm.org/D127016
lldb/source/Commands/CommandObjectMemory.cpp
lldb/test/Shell/Driver/TestPageZeroRead.test [new file with mode: 0644]