[all-commits] [llvm/llvm-project] 208b92: [HWASan] do not replace lifetime intrinsics with t...

Florian Mayer via All-commits all-commits at lists.llvm.org
Fri Mar 18 09:45:23 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 208b923e74feeb986fe5114ca39a74b1d2032ed7
      https://github.com/llvm/llvm-project/commit/208b923e74feeb986fe5114ca39a74b1d2032ed7
  Author: Florian Mayer <fmayer at google.com>
  Date:   2022-03-18 (Fri, 18 Mar 2022)

  Changed paths:
    M llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
    M llvm/test/Instrumentation/HWAddressSanitizer/exception-lifetime.ll
    A llvm/test/Instrumentation/HWAddressSanitizer/stack-coloring.ll
    M llvm/test/Instrumentation/HWAddressSanitizer/use-after-scope.ll

  Log Message:
  -----------
  [HWASan] do not replace lifetime intrinsics with tagged address.

Quote from the LLVM Language Reference
  If ptr is a stack-allocated object and it points to the first byte of the
  object, the object is initially marked as dead. ptr is conservatively
  considered as a non-stack-allocated object if the stack coloring algorithm
  that is used in the optimization pipeline cannot conclude that ptr is a
  stack-allocated object.

By replacing the alloca pointer with the tagged address before this change,
we confused the stack coloring algorithm.

Reviewed By: eugenis

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




More information about the All-commits mailing list