[all-commits] [llvm/llvm-project] f341d7: [lldb] Make MemoryCache::Read more resilient

Alex via All-commits all-commits at lists.llvm.org
Thu Mar 16 15:23:03 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f341d7a4091a6ec1c1a4a49c4810d4a8b036ad60
      https://github.com/llvm/llvm-project/commit/f341d7a4091a6ec1c1a4a49c4810d4a8b036ad60
  Author: Alex Langford <alangford at apple.com>
  Date:   2023-03-16 (Thu, 16 Mar 2023)

  Changed paths:
    M lldb/include/lldb/Target/Memory.h
    M lldb/source/Target/Memory.cpp
    M lldb/unittests/Target/CMakeLists.txt
    A lldb/unittests/Target/MemoryTest.cpp

  Log Message:
  -----------
  [lldb] Make MemoryCache::Read more resilient

MemoryCache::Read is not resilient to partial reads when reading memory
chunks less than or equal in size to L2 cache lines. There have been
attempts in the past to fix this but nothing really solved the root of
the issue.

I first created a test exercising MemoryCache's implementation and
documenting how I believe MemoryCache::Read should behave. I then
rewrote the implementation of MemoryCache::Read as needed to make sure
that the different scenarios behaved correctly.

rdar://105407095

Differential Revision: https://reviews.llvm.org/D145624




More information about the All-commits mailing list