[PATCH] D90351: [GWP-ASan] Add mutexes for Fuchsia

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 28 16:04:30 PDT 2020


cryptoad created this revision.
cryptoad added reviewers: hctim, eugenis, mcgrathr.
Herald added subscribers: Sanitizers, phosek, mgorny.
Herald added a project: Sanitizers.
cryptoad requested review of this revision.

Mitch expressed a preference to not have `#ifdef`s in platform agnostic
code, this change tries to accomodate this.

I am not attached to the method this CL proposes, so if anyone has a
suggestion, I am open.

We move the platform specific member of the mutex into its own platform
specific class that the main `Mutex` class inherits from. Functions are
implemented in their respective platform specific compilation units.

For Fuchsia, we use the sync APIs, as those are also the ones being
used in Scudo.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D90351

Files:
  compiler-rt/lib/gwp_asan/CMakeLists.txt
  compiler-rt/lib/gwp_asan/mutex.h
  compiler-rt/lib/gwp_asan/platform_specific/mutex_fuchsia.cpp
  compiler-rt/lib/gwp_asan/platform_specific/mutex_fuchsia.h
  compiler-rt/lib/gwp_asan/platform_specific/mutex_posix.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D90351.301464.patch
Type: text/x-patch
Size: 4372 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201028/33d52a8d/attachment.bin>


More information about the llvm-commits mailing list