[all-commits] [llvm/llvm-project] e0f7ef: [msan] Fix handling of ParamTLS overflow.

Evgenii Stepanov via All-commits all-commits at lists.llvm.org
Tue Apr 4 13:52:44 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e0f7ef4b9ccf906f5382578a7ac0a0ba8d6d4f2b
      https://github.com/llvm/llvm-project/commit/e0f7ef4b9ccf906f5382578a7ac0a0ba8d6d4f2b
  Author: Evgenii Stepanov <eugenis at google.com>
  Date:   2023-04-04 (Tue, 04 Apr 2023)

  Changed paths:
    M llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
    M llvm/test/Instrumentation/MemorySanitizer/Mips/vararg-mips64.ll
    M llvm/test/Instrumentation/MemorySanitizer/Mips/vararg-mips64el.ll
    M llvm/test/Instrumentation/MemorySanitizer/PowerPC/vararg-ppc64.ll
    M llvm/test/Instrumentation/MemorySanitizer/PowerPC/vararg-ppc64le.ll
    M llvm/test/Instrumentation/MemorySanitizer/msan_debug_info.ll
    M llvm/test/Instrumentation/MemorySanitizer/msan_kernel_basic.ll

  Log Message:
  -----------
  [msan] Fix handling of ParamTLS overflow.

Ironically, MSan copies uninitialized data off the stack into
VAArgTLSCopy in the callee-side handling of va_start. Clamp the copy
size to the actual length of the buffer, and zero-initialize the
remainder.

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




More information about the All-commits mailing list