[PATCH] D63612: [scudo][standalone] Introduce the C & C++ wrappers

Kostya Kortchinsky via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 20 09:54:19 PDT 2019


cryptoad created this revision.
cryptoad added reviewers: morehouse, eugenis, vitalybuka, hctim.
Herald added subscribers: Sanitizers, jfb, delcypher, mgorny, srhines.
Herald added a reviewer: rengolin.
Herald added projects: LLVM, Sanitizers.

This CL adds C & C++ wrappers and associated tests. Those use default
configurations for a Scudo combined allocator that will likely be
tweaked in the future.

This is the final CL required to have a functional C & C++ allocator
based on Scudo.

The structure I have chosen is to define the core C allocation
primitives in an `.inc` file that can be customized through defines.
This allows to easily have 2 (or more) sets of wrappers backed by
different combined allocators, as demonstrated by the `Bionic`
wrappers: one set for the "default" allocator, one set for the "svelte"
allocator.

Currently all the tests added have been gtests, but I am planning to
add some more lit tests as well.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D63612

Files:
  lib/scudo/standalone/CMakeLists.txt
  lib/scudo/standalone/tests/CMakeLists.txt
  lib/scudo/standalone/tests/wrappers_c_test.cc
  lib/scudo/standalone/tests/wrappers_cpp_test.cc
  lib/scudo/standalone/tsd.h
  lib/scudo/standalone/wrappers.inc
  lib/scudo/standalone/wrappers_c.cc
  lib/scudo/standalone/wrappers_c.h
  lib/scudo/standalone/wrappers_c_bionic.cc
  lib/scudo/standalone/wrappers_c_checks.h
  lib/scudo/standalone/wrappers_cpp.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D63612.205849.patch
Type: text/x-patch
Size: 34546 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190620/6a92b288/attachment.bin>


More information about the llvm-commits mailing list