diff options
author | Jason Molenda <jmolenda@apple.com> | 2024-11-15 00:26:10 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-15 00:26:10 -0800 |
commit | a1a1a4ced9d4ecba428175c45a24da476bdc55f4 (patch) | |
tree | b1ef5ac9b00e496a7dd2a1b4beb3f427a0307eae /clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp | |
parent | 87bfa58a5a4b85416d2486797d0f21fc67da5cf3 (diff) | |
download | llvm-a1a1a4ced9d4ecba428175c45a24da476bdc55f4.zip llvm-a1a1a4ced9d4ecba428175c45a24da476bdc55f4.tar.gz llvm-a1a1a4ced9d4ecba428175c45a24da476bdc55f4.tar.bz2 |
[lldb] Handle an empty SBMemoryRegionInfo from scripted process (#115963)
A scripted process implementation might return an SBMemoryRegionInfo
object in its implementation of `get_memory_region_containing_address`
which will have an address 0 and size 0, without realizing the problems
this can cause. Several algorithms in lldb will try to iterate over the
MemoryRegions of the process, starting at address 0 and expecting to
iterate up to the highest vm address, stepping by the size of each
region, so a 0-length region will result in an infinite loop. Add a
check to Process::GetMemoryRegionInfo that rejects a MemoryRegion which
does not contain the requested address; a 0-length memory region will
therefor always be rejected.
rdar://139678032
Diffstat (limited to 'clang/lib/StaticAnalyzer/Checkers/StdLibraryFunctionsChecker.cpp')
0 files changed, 0 insertions, 0 deletions