[all-commits] [llvm/llvm-project] de5416: [dfsan] Support Linux AArch64

Fangrui Song via All-commits all-commits at lists.llvm.org
Tue Jan 3 13:17:52 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: de5416cb59b0cffbc98f8fdfeaae67ca2495faa1
      https://github.com/llvm/llvm-project/commit/de5416cb59b0cffbc98f8fdfeaae67ca2495faa1
  Author: Fangrui Song <i at maskray.me>
  Date:   2023-01-03 (Tue, 03 Jan 2023)

  Changed paths:
    M compiler-rt/lib/dfsan/dfsan_allocator.cpp
    M compiler-rt/lib/dfsan/dfsan_platform.h
    M compiler-rt/test/dfsan/interceptors.c
    M compiler-rt/test/dfsan/lit.cfg.py
    M compiler-rt/test/dfsan/origin_invalid.c
    M llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp

  Log Message:
  -----------
  [dfsan] Support Linux AArch64

compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake:ALL_DFSAN_SUPPORTED_ARCH
allows AArch64 but currently the instrumentation will crash.

Port Linux AArch64 memory mappings from msan but use
SizeClassAllocator64 for a slightly more efficient allocator (used by
asan/lsan). Change dfsan/lit.cfg.py to allow Linux aarch64. All tests
should pass.

* dfsan/origin_invalid.c uses x86_64 assembly. Just make it x86_64 specific.
* dfsan/interceptors.c our mallinfo interceptor takes an argument
  instead of returning a struct. This does not work on AArch64 which
  uses different registers for the two function types. Disable AArch64
  as msan/Linux/mallinfo.cpp does.

Reviewed By: #sanitizers, vitalybuka

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




More information about the All-commits mailing list