[TTC-8][Sanitizers] Secondary allocator respects allocator_may_return_null=1. 35/149935/2
authorAlex Shlyapnikov <alekseys@google.com>
Wed, 13 Sep 2017 12:50:25 +0000 (15:50 +0300)
committerDongkyun Son <dongkyun.s@samsung.com>
Fri, 20 Oct 2017 08:23:20 +0000 (08:23 +0000)
commit47e16e738a6ef562ee456b4051e314242a5edbae
tree8732d49a1fa7c69cd3c73f1c2401a0b8b9c64e5f
parent60af37c3341505774d6aec59def8c2fa284e10d7
[TTC-8][Sanitizers] Secondary allocator respects allocator_may_return_null=1.

Summary:
Context: https://github.com/google/sanitizers/issues/740.

Making secondary allocator to respect allocator_may_return_null=1 flag
and return nullptr when "out of memory" happens.

More changes in primary allocator and operator new will follow.

Reviewers: eugenis

Subscribers: kubamracek, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@305569 91177308-0d34-0410-b5e6-96231b3b80d8

Change-Id: I534117600099ec8953a6d83c559da0cf3bdfb5ad
libsanitizer/sanitizer_common/sanitizer_allocator_secondary.h
libsanitizer/sanitizer_common/sanitizer_common.h
libsanitizer/sanitizer_common/sanitizer_posix.cc
libsanitizer/sanitizer_common/sanitizer_win.cc