[all-commits] [llvm/llvm-project] 3427cb: [lldb] Prevent an infinite loop while reading mem...

Pavel Labath via All-commits all-commits at lists.llvm.org
Fri Nov 25 02:55:57 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3427cb5b3a55a454e5750f6318ced8a5d7c1442d
      https://github.com/llvm/llvm-project/commit/3427cb5b3a55a454e5750f6318ced8a5d7c1442d
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2022-11-25 (Fri, 25 Nov 2022)

  Changed paths:
    M lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp
    A lldb/test/API/functionalities/gdb_remote_client/TestGdbClientMemoryRegions.py

  Log Message:
  -----------
  [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.


  Commit: c699a81bc98804650fdd4a85de085e257e074878
      https://github.com/llvm/llvm-project/commit/c699a81bc98804650fdd4a85de085e257e074878
  Author: Pavel Labath <pavel at labath.sk>
  Date:   2022-11-25 (Fri, 25 Nov 2022)

  Changed paths:
    M lldb/test/Shell/SymbolFile/DWARF/x86/module-ownership.mm

  Log Message:
  -----------
  [lldb/test] Remove the module cache directory in module-ownership.mm

The stale cache directory can cause compilation to fail when ast
serialization changes.


Compare: https://github.com/llvm/llvm-project/compare/b62c8d396f7d...c699a81bc988


More information about the All-commits mailing list