hanchenye-llvm-project/compiler-rt/lib/scudo
Kostya Kortchinsky 1da3ea561a [scudo] Fix a bug in the new Secondary Allocator
Summary:
GetActuallyAllocatedSize() was not accounting for the last page of the mapping
being a guard page, and was returning the wrong number of actually allocated
bytes, which in turn would mess up with the realloc logic. Current tests didn't
find this as the size exercised was only serviced by the Primary.

Correct the issue by subtracting PageSize, and update the realloc test to
exercise paths in both the Primary and the Secondary.

Reviewers: kcc

Subscribers: llvm-commits

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

llvm-svn: 282030
2016-09-20 22:17:59 +00:00
..
CMakeLists.txt [CMake] Connect Compiler-RT targets to LLVM Runtimes directory 2016-08-26 20:52:22 +00:00
scudo_allocator.cpp [scudo] Modify Scudo to use its own Secondary Allocator 2016-09-19 21:11:55 +00:00
scudo_allocator.h
scudo_allocator_secondary.h [scudo] Fix a bug in the new Secondary Allocator 2016-09-20 22:17:59 +00:00
scudo_flags.cpp [sanitizer] Implement a __asan_default_options() equivalent for Scudo 2016-08-02 22:25:38 +00:00
scudo_flags.h
scudo_flags.inc
scudo_interceptors.cpp
scudo_new_delete.cpp
scudo_termination.cpp [sanitizer] Implement a __asan_default_options() equivalent for Scudo 2016-08-02 22:25:38 +00:00
scudo_utils.cpp [sanitizer] Implement a __asan_default_options() equivalent for Scudo 2016-08-02 22:25:38 +00:00
scudo_utils.h [scudo] add NORETURN to the declaration of dieWithMessage; this should fix a warning in lib/scudo/scudo_termination.cpp 2016-08-02 23:23:13 +00:00