[all-commits] [llvm/llvm-project] 63ad08: [GWP-ASan] Fuchsia specific mapping & utilities fu...

Kostya Kortchinsky via All-commits all-commits at lists.llvm.org
Sat Oct 31 10:23:22 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 63ad0876567d7a782daedfe9f564942a37f063f5
      https://github.com/llvm/llvm-project/commit/63ad0876567d7a782daedfe9f564942a37f063f5
  Author: Kostya Kortchinsky <kostyak at google.com>
  Date:   2020-10-31 (Sat, 31 Oct 2020)

  Changed paths:
    M compiler-rt/lib/gwp_asan/CMakeLists.txt
    M compiler-rt/lib/gwp_asan/guarded_pool_allocator.h
    A compiler-rt/lib/gwp_asan/platform_specific/common_fuchsia.cpp
    A compiler-rt/lib/gwp_asan/platform_specific/guarded_pool_allocator_fuchsia.cpp
    A compiler-rt/lib/gwp_asan/platform_specific/guarded_pool_allocator_fuchsia.h
    A compiler-rt/lib/gwp_asan/platform_specific/guarded_pool_allocator_posix.h
    M compiler-rt/lib/gwp_asan/platform_specific/guarded_pool_allocator_tls.h
    A compiler-rt/lib/gwp_asan/platform_specific/utilities_fuchsia.cpp

  Log Message:
  -----------
  [GWP-ASan] Fuchsia specific mapping & utilities functions

This CL introduces the Fuchsia versions of the existing platform
specific functions.

For Fuchsia, we need to track the VMAR (https://fuchsia.dev/fuchsia-src/reference/kernel_objects/vm_address_region)
of the Guarded Pool mapping, and for this purpose I added some platform
specific data structure that remains empty on POSIX platforms.

`getThreadID` is not super useful for Fuchsia so it's just left as a
stub for now.

While testing the changes in my Fuchsia tree, I realized that
`guarded_pool_allocator_tls.h` should have closed the namespace before
including `GWP_ASAN_PLATFORM_TLS_HEADER`, otherwise drama ensues.

This was tested in g3, upstream LLVM, and Fuchsia (with local changes).

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




More information about the All-commits mailing list