[all-commits] [llvm/llvm-project] 256e61: [LLDB] Fix AddressSanitizer failure in MemoryCache

Paolo Severini via All-commits all-commits at lists.llvm.org
Thu Feb 27 11:17:50 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 256e61699b19c8e3545c948547c12872a8567250
      https://github.com/llvm/llvm-project/commit/256e61699b19c8e3545c948547c12872a8567250
  Author: Paolo Severini <paolosev at microsoft.com>
  Date:   2020-02-27 (Thu, 27 Feb 2020)

  Changed paths:
    M lldb/source/Core/Module.cpp
    M lldb/source/Target/Memory.cpp

  Log Message:
  -----------
  [LLDB] Fix AddressSanitizer failure in MemoryCache

The lldb sanitizer bot is flagging a container-overflow error after we
introduced test TestWasm.py. MemoryCache::Read didn't behave correctly
in case of partial reads that can happen with object files whose size is
smaller that the cache size. It should return the actual number of bytes
read and not try to fill the buffer with random memory.
Module::GetMemoryObjectFile needs to be modified accordingly, to resize
its buffer to only the size that was read.

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




More information about the All-commits mailing list