[all-commits] [llvm/llvm-project] 74b0ac: [compiler-rt] Allow 3 simultaneous interceptors on...

Marco Elver via All-commits all-commits at lists.llvm.org
Wed Jun 7 00:11:26 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 74b0ac571b5facee3c8038d21ed71d7a29ee1098
      https://github.com/llvm/llvm-project/commit/74b0ac571b5facee3c8038d21ed71d7a29ee1098
  Author: Marco Elver <elver at google.com>
  Date:   2023-06-07 (Wed, 07 Jun 2023)

  Changed paths:
    M compiler-rt/lib/interception/interception.h
    M compiler-rt/lib/interception/tests/CMakeLists.txt
    A compiler-rt/lib/interception/tests/interception_linux_foreign_test.cpp
    M compiler-rt/lib/interception/tests/interception_linux_test.cpp
    M compiler-rt/lib/sanitizer_common/sanitizer_asm.h
    M compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_printer.cpp
    M compiler-rt/lib/sanitizer_common/scripts/gen_dynamic_list.py

  Log Message:
  -----------
  [compiler-rt] Allow 3 simultaneous interceptors on Linux

Rework Linux (and *BSD) interceptors to allow for up to 3 (2 for *BSD)
simultaneous interceptors. See code comments for details.

The main motivation is to support new sampling sanitizers (in the spirit
of GWP-ASan), that have to intercept few functions. Unfortunately, the
reality is that there are user interceptors that exist in the wild.

To support foreign user interceptors, foreign dynamic analysis
interceptors, and compiler-rt interceptors all at the same time,
including any combination of them, this change enables up to 3
interceptors on Linux (2 on *BSD).

Reviewed By: dvyukov, MaskRay, vitalybuka

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




More information about the All-commits mailing list