[all-commits] [llvm/llvm-project] 114537: [ASAN] Properly deal with musttail calls in ASAN

Xun Li via All-commits all-commits at lists.llvm.org
Fri Sep 18 23:11:02 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 11453740bc6fb7c9a5fba3e0761060fc2182dc14
      https://github.com/llvm/llvm-project/commit/11453740bc6fb7c9a5fba3e0761060fc2182dc14
  Author: Xun Li <xun at fb.com>
  Date:   2020-09-18 (Fri, 18 Sep 2020)

  Changed paths:
    M llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
    A llvm/test/Instrumentation/AddressSanitizer/musttail.ll

  Log Message:
  -----------
  [ASAN] Properly deal with musttail calls in ASAN

When address sanitizing a function, stack unpinsoning code is inserted before each ret instruction. However if the ret instruciton is preceded by a musttail call, such transformation broke the musttail call contract and generates invalid IR.
This patch fixes the issue by moving the insertion point prior to the musttail call if there is one.

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




More information about the All-commits mailing list