[PATCH] D20084: [sanitizer] Initial implementation of a Hardened Allocator

Kostya Kortchinsky via llvm-commits llvm-commits at lists.llvm.org
Wed May 18 16:11:22 PDT 2016


cryptoad updated this revision to Diff 57702.
cryptoad marked 24 inline comments as done.
cryptoad added a comment.

This diff addresses another batch of comments from the review, as well as some renaming to converge towards LLVM coding standard compliance.
Among the notable changes:

- a fallback mechanism has been added to service allocations and deallocation post thread tear-down as per dvyukov guidance;
- the initialization has been moved around to not depend on .preinit_array; a test has been added to make sure that preinit allocations are serviced successfully;
- std::atomic is used in place of the GCC builtins; the compiled code is identical.

There are still some comments left to address, notably regarding the source of randomness.


http://reviews.llvm.org/D20084

Files:
  docs/HardenedAllocator.rst
  projects/compiler-rt/cmake/config-ix.cmake
  projects/compiler-rt/lib/CMakeLists.txt
  projects/compiler-rt/lib/hardened_allocator/CMakeLists.txt
  projects/compiler-rt/lib/hardened_allocator/scudo_allocator.cc
  projects/compiler-rt/lib/hardened_allocator/scudo_allocator.h
  projects/compiler-rt/lib/hardened_allocator/scudo_flags.cc
  projects/compiler-rt/lib/hardened_allocator/scudo_flags.h
  projects/compiler-rt/lib/hardened_allocator/scudo_flags.inc
  projects/compiler-rt/lib/hardened_allocator/scudo_malloc_linux.cc
  projects/compiler-rt/lib/hardened_allocator/scudo_new_delete.cc
  projects/compiler-rt/lib/hardened_allocator/scudo_utils.cc
  projects/compiler-rt/lib/hardened_allocator/scudo_utils.h
  projects/compiler-rt/test/CMakeLists.txt
  projects/compiler-rt/test/hardened_allocator/CMakeLists.txt
  projects/compiler-rt/test/hardened_allocator/alignment.cc
  projects/compiler-rt/test/hardened_allocator/double-free.cc
  projects/compiler-rt/test/hardened_allocator/lit.cfg
  projects/compiler-rt/test/hardened_allocator/lit.site.cfg.in
  projects/compiler-rt/test/hardened_allocator/malloc.cc
  projects/compiler-rt/test/hardened_allocator/memalign.cc
  projects/compiler-rt/test/hardened_allocator/mismatch.cc
  projects/compiler-rt/test/hardened_allocator/overflow.cc
  projects/compiler-rt/test/hardened_allocator/preinit.cc
  projects/compiler-rt/test/hardened_allocator/quarantine.cc
  projects/compiler-rt/test/hardened_allocator/realloc.cc
  projects/compiler-rt/test/hardened_allocator/sized-delete.cc
  projects/compiler-rt/test/hardened_allocator/sizes.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20084.57702.patch
Type: text/x-patch
Size: 69651 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160518/b91d5563/attachment.bin>


More information about the llvm-commits mailing list