[all-commits] [llvm/llvm-project] 175fcd: [compiler-rt] Simplify ALIAS() attribute macro

Marco Elver via All-commits all-commits at lists.llvm.org
Wed May 24 02:58:19 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 175fcd6fd24cda6bcdafb9718da8122b5654a047
      https://github.com/llvm/llvm-project/commit/175fcd6fd24cda6bcdafb9718da8122b5654a047
  Author: Marco Elver <elver at google.com>
  Date:   2023-05-24 (Wed, 24 May 2023)

  Changed paths:
    M compiler-rt/lib/asan/asan_interceptors.cpp
    M compiler-rt/lib/hwasan/hwasan_allocation_functions.cpp
    M compiler-rt/lib/interception/interception.h
    M compiler-rt/lib/lsan/lsan_interceptors.cpp
    M compiler-rt/lib/memprof/memprof_interceptors.cpp
    M compiler-rt/lib/msan/msan_interceptors.cpp
    M compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc
    M compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
    M compiler-rt/lib/sanitizer_common/sanitizer_win_dll_thunk.h
    M compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_testlib.cpp
    M compiler-rt/lib/tsan/rtl/tsan_interceptors.h

  Log Message:
  -----------
  [compiler-rt] Simplify ALIAS() attribute macro

Most uses of ALIAS() are in conjunction with WRAPPER_NAME().

Simplify the code and just make ALIAS() turn its argument into a string
(similar to Linux kernel's __alias macro). This in turn allows removing
WRAPPER_NAME().

NFC.

Reviewed By: dvyukov

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


  Commit: 2f1e2a6b1ca271b6b0dae169d1c793ffcc37c546
      https://github.com/llvm/llvm-project/commit/2f1e2a6b1ca271b6b0dae169d1c793ffcc37c546
  Author: Marco Elver <elver at google.com>
  Date:   2023-05-24 (Wed, 24 May 2023)

  Changed paths:
    M compiler-rt/lib/hwasan/hwasan_setjmp_aarch64.S
    M compiler-rt/lib/hwasan/hwasan_setjmp_riscv64.S
    M compiler-rt/lib/hwasan/hwasan_setjmp_x86_64.S

  Log Message:
  -----------
  [HWASan] Use ASM_WRAPPER_NAME instead of __interceptor_*

Use ASM_WRAPPER_NAME to produce the name of the __interceptor_*
functions.

NFC.

Reviewed By: dvyukov

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


  Commit: 6177198b20f271d95fb311137402424dd6bc6883
      https://github.com/llvm/llvm-project/commit/6177198b20f271d95fb311137402424dd6bc6883
  Author: Marco Elver <elver at google.com>
  Date:   2023-05-24 (Wed, 24 May 2023)

  Changed paths:
    M compiler-rt/lib/tsan/rtl/tsan_interceptors_posix.cpp

  Log Message:
  -----------
  [TSan] Remove unused setjmp definitions

The __interceptor_*setjmp() definitions appear to have been defined for
the purpose of TSAN_INTERCEPT(), but on non-Mac systems, it seems
TSAN_INTERCEPT() isn't even being used anymore for setjmp.

Remove them. Nothing should call them anyway (due to CHECK-fail), so
having the linker fail is better than failing at runtime.

Reviewed By: dvyukov

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


  Commit: e522fe1ebe30f8d760097647e04646322cc0cdf1
      https://github.com/llvm/llvm-project/commit/e522fe1ebe30f8d760097647e04646322cc0cdf1
  Author: Marco Elver <elver at google.com>
  Date:   2023-05-24 (Wed, 24 May 2023)

  Changed paths:
    M compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc

  Log Message:
  -----------
  [compiler-rt] Always use INTERCEPTOR()+ALIAS()+WRAP() to create interceptor alias

Do not open code creation of an interceptor alias to another
interceptor. Instead, use INTERCEPTOR() + ALIAS() + WRAP.

Reviewed By: dvyukov

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


Compare: https://github.com/llvm/llvm-project/compare/5568ce058035...e522fe1ebe30


More information about the All-commits mailing list