[all-commits] [llvm/llvm-project] 1cf5c7: [msan] Disambiguate warnings debug location

Vitaly Buka via All-commits all-commits at lists.llvm.org
Thu Sep 8 14:17:35 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1cf5c7fe8ce21b3add80972e6aaeb30a1f61bff9
      https://github.com/llvm/llvm-project/commit/1cf5c7fe8ce21b3add80972e6aaeb30a1f61bff9
  Author: Vitaly Buka <vitalybuka at google.com>
  Date:   2022-09-08 (Thu, 08 Sep 2022)

  Changed paths:
    M llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp
    A llvm/test/Instrumentation/MemorySanitizer/disambiguate-origin.ll

  Log Message:
  -----------
  [msan] Disambiguate warnings debug location

If multiple warnings created on the same instruction (debug location)
it can be difficult to figure out which input value is the cause.

This patches chains origins just before the warning using last origins
update debug information.

To avoid inflating the binary unnecessarily, do this only when uncertainty is
high enough, 3 warnings by default. On average it adds 0.4% to the
.text size.

Reviewed By: kda, fmayer

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




More information about the All-commits mailing list