[sanitizer] fix an allocator bug where the allocated memory may overlap with the...
authorKostya Serebryany <kcc@google.com>
Fri, 9 Sep 2016 21:42:33 +0000 (21:42 +0000)
committerKostya Serebryany <kcc@google.com>
Fri, 9 Sep 2016 21:42:33 +0000 (21:42 +0000)
commit58560a05ad15cd7439183e07e72bbb6b09d1f236
treed7f7d7370a6399e98f86715b2bbaad3da2d95669
parentb1153848ffecb1526e675212a61afe330fd771e5
[sanitizer] fix an allocator bug where the allocated memory may overlap with the free array (kudos to Kostya Korcthinsky). Also make sure that the allocator does not mmap more than requested. Test both.

llvm-svn: 281103
compiler-rt/lib/sanitizer_common/sanitizer_allocator_primary64.h
compiler-rt/lib/sanitizer_common/tests/sanitizer_allocator_test.cc