[all-commits] [llvm/llvm-project] b726df: [msan] Increase size of app/shadow/origin mappings...

thurstond via All-commits all-commits at lists.llvm.org
Tue Nov 29 12:57:32 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b726df1b3acc9517db5e0d8049819327231c1e9b
      https://github.com/llvm/llvm-project/commit/b726df1b3acc9517db5e0d8049819327231c1e9b
  Author: Thurston Dang <thurston at google.com>
  Date:   2022-11-29 (Tue, 29 Nov 2022)

  Changed paths:
    M compiler-rt/lib/msan/msan.h
    M llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp

  Log Message:
  -----------
  [msan] Increase size of app/shadow/origin mappings on aarch64

msan's app memory mappings for aarch64 are constrained by
the MEM_TO_SHADOW constant to 64GB or less, and some app
memory mappings (in kMemoryLayout) are even smaller in
practice. This will lead to a crash with the error message
"MemorySanitizer can not mmap the shadow memory" if the
executable's memory mappings (e.g., libraries) extend
beyond msan's app memory mappings.

This patch makes the app/shadow/origin memory mappings
considerably larger, along with corresponding changes to
the MEM_TO_SHADOW and SHADOW_TO_ORIGIN constants.

Note that this deprecates compatibility with 39- and 42-bit
VMAs.

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




More information about the All-commits mailing list