[PATCH] D21025: [tsan] Switch to InternalAlloc everywhere __libc_malloc is currently used

Kuba Brecka via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 6 08:55:37 PDT 2016


kubabrecka created this revision.
kubabrecka added reviewers: dvyukov, samsonov, glider, kcc.
kubabrecka added subscribers: llvm-commits, zaks.anna, dcoughlin.
kubabrecka added a project: Sanitizers.
Herald added subscribers: kubabrecka, srhines, danalbert, tberghammer.

This patch replaces all uses of __libc_malloc and friends with the internal allocator.

It seems that the only reason why we have calls to __libc_malloc in the first place was the lack of the internal allocator at the time.  Using the internal allocator will also make sure that the system allocator is never used (this is the same behavior as ASan), and we don’t have to worry about working with unknown pointers coming from the system allocator.

http://reviews.llvm.org/D21025

Files:
  lib/sanitizer_common/sanitizer_allocator.cc
  lib/sanitizer_common/sanitizer_allocator_internal.h
  lib/tsan/dd/dd_interceptors.cc
  lib/tsan/rtl/tsan_interceptors.cc
  lib/tsan/rtl/tsan_interceptors.h
  lib/tsan/rtl/tsan_malloc_mac.cc
  lib/tsan/rtl/tsan_new_delete.cc

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21025.59728.patch
Type: text/x-patch
Size: 13542 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160606/6a175e7c/attachment.bin>


More information about the llvm-commits mailing list