[PATCH] D146858: [msan] Fix handling of ParamTLS overflow.

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 24 18:10:55 PDT 2023


eugenis created this revision.
eugenis added a reviewer: vitalybuka.
Herald added subscribers: Enna1, atanasyan, jrtc27, kbarton, hiraditya, nemanjai, sdardis.
Herald added a project: All.
eugenis requested review of this revision.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D146858

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146858.508259.patch
Type: text/x-patch
Size: 13285 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230325/91843599/attachment.bin>


More information about the llvm-commits mailing list