[all-commits] [llvm/llvm-project] 77654a: [tsan] Replace mem intrinsics with calls to interc...

Vitaly Buka via All-commits all-commits at lists.llvm.org
Tue Sep 6 08:25:54 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 77654a65a373da9c4829de821e7b393ea811ee40
      https://github.com/llvm/llvm-project/commit/77654a65a373da9c4829de821e7b393ea811ee40
  Author: Vitaly Buka <vitalybuka at google.com>
  Date:   2022-09-06 (Tue, 06 Sep 2022)

  Changed paths:
    M compiler-rt/lib/tsan/rtl/tsan.syms.extra
    M compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp
    M compiler-rt/lib/tsan/rtl/tsan_interface.h
    M llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
    M llvm/test/Instrumentation/ThreadSanitizer/tsan_basic.ll

  Log Message:
  -----------
  [tsan] Replace mem intrinsics with calls to interceptors

After https://reviews.llvm.org/rG463aa814182a23 tsan replaces llvm
intrinsics with calls to glibc functions. However this approach is
fragile, as slight changes in pipeline can return llvm intrinsics back.
In particular InstCombine can do that.

Msan/Asan already declare own version of these memory
functions for the similar purpose.

KCSAN, or anything that uses something else than compiler-rt, needs to
implement this callbacks.

Reviewed By: melver

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




More information about the All-commits mailing list