aboutsummaryrefslogtreecommitdiff
path: root/lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h
diff options
context:
space:
mode:
authorJason Molenda <jmolenda@apple.com>2024-07-24 17:25:57 -0700
committerGitHub <noreply@github.com>2024-07-24 17:25:57 -0700
commit2ba1aeed2efd8156717886f89f6d4270b1df7a18 (patch)
tree1a120d5267bd17dc07f892e0d6c1df067e82fc36 /lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h
parente894df6392beea3723627329009f3e6d51d16f47 (diff)
downloadllvm-2ba1aeed2efd8156717886f89f6d4270b1df7a18.zip
llvm-2ba1aeed2efd8156717886f89f6d4270b1df7a18.tar.gz
llvm-2ba1aeed2efd8156717886f89f6d4270b1df7a18.tar.bz2
[lldb] Don't use a vm addr range starting at 0 for local memory (#100288)
When an inferior stub cannot allocate memory for lldb, and lldb needs to store the result of expressions, it will do it in lldb's own memory range ("host memory"). But it needs to find a virtual address range that is not used in the inferior process. It tries to use the qMemoryRegionInfo gdb remote serial protocol packet to find a range that is inaccessible, starting at address 0 and moving up the size of each region. If the first region found at address 0 is inaccessible, lldb will use the address range starting at 0 to mean "read lldb's host memory, not the process memory", and programs that crash with a null dereference will have poor behavior. This patch skips consideration of a memory region that starts at address 0. I also clarified the documentation of qMemoryRegionInfo to make it clear that the stub is required to provide permissions for a memory range that is accessable, it is not an optional key in this response. This issue was originally found by a stub that did not list permissions in its response, and lldb treated the first region returned as the one it would use. (the stub also didn't support the memory-allocate packet)
Diffstat (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/lldb-python.h')
0 files changed, 0 insertions, 0 deletions