llvm-project/lldb/test/Shell/Driver/TestPageZeroRead.test
Chelsea Cassanova 0f02dd34f2 [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
2022-06-08 18:10:41 -04:00

7 lines
331 B
Plaintext

# REQUIRES: system-darwin
# Ensure that the read from memory command doesn't try and read from page zero.
# RUN: %clang_host %p/Inputs/hello.c -g -o a.out
# RUN: %lldb -b a.out -o 'settings set interpreter.stop-command-source-on-error false' -s %s 2>&1 | FileCheck %s
x 0
# CHECK: error: error reading data from section __PAGEZERO