[all-commits] [llvm/llvm-project] 44dbbe: [HIP] Preserve ASAN bitcode library functions

Yaxun (Sam) Liu via All-commits all-commits at lists.llvm.org
Fri Jul 23 07:36:28 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 44dbbe61060acac4d0991a15decac4c909e26844
      https://github.com/llvm/llvm-project/commit/44dbbe61060acac4d0991a15decac4c909e26844
  Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
  Date:   2021-07-23 (Fri, 23 Jul 2021)

  Changed paths:
    M clang/lib/CodeGen/CodeGenModule.cpp
    M clang/lib/Driver/Driver.cpp
    A clang/test/CodeGenCUDA/amdgpu-asan.cu
    M clang/test/Driver/hip-sanitize-options.hip

  Log Message:
  -----------
  [HIP] Preserve ASAN bitcode library functions

Address sanitizer passes may generate call of ASAN bitcode library
functions after bitcode linking in lld, therefore lld cannot add
those symbols since it does not know they will be used later.

To solve this issue, clang emits a reference to a bicode library
function which calls all ASAN functions which need to be
preserved. This basically force all ASAN functions to be
linked in.

Reviewed by: Artem Belevich

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




More information about the All-commits mailing list