diff options
author | Pavel Labath <pavel@labath.sk> | 2022-11-25 11:36:28 +0100 |
---|---|---|
committer | Pavel Labath <pavel@labath.sk> | 2022-11-25 11:55:41 +0100 |
commit | 3427cb5b3a55a454e5750f6318ced8a5d7c1442d (patch) | |
tree | 44dfdd38fce66b8647cc8b564c696edaa89474ec /llvm/lib/Support/TargetParser.cpp | |
parent | b62c8d396f7dbef61122e169ef143276e74eff05 (diff) | |
download | llvm-3427cb5b3a55a454e5750f6318ced8a5d7c1442d.zip llvm-3427cb5b3a55a454e5750f6318ced8a5d7c1442d.tar.gz llvm-3427cb5b3a55a454e5750f6318ced8a5d7c1442d.tar.bz2 |
[lldb] Prevent an infinite loop while reading memory regions
A malformed qMemoryRegionInfo response can easily trigger an infinite
loop if regions end (base + size) wraps the address space. A
particularly interesting is the case where base+size=0, which a stub
could use to say that the rest of the memory space is unmapped, even
though lldb expects 0xff... in this case.
One could argue which behavior is more correct (technically, the
current behavior does not say anything about the last byte), but unless
we stop using 0xff... to mean "invalid address", that discussion is very
academic. This patch truncates address ranges which wraps the address
space, which handles the zero case as well as other kinds of malformed
packets.
Diffstat (limited to 'llvm/lib/Support/TargetParser.cpp')
0 files changed, 0 insertions, 0 deletions