Commit Graph

559 Commits

Author SHA1 Message Date
Daniel Micay
10c5d61187 work around glibc bug in mallinfo test 2020-11-10 14:14:08 -05:00
Daniel Micay
b90f650153 fix sized deallocation check with large sizes
The CONFIG_CXX_ALLOCATOR feature enables sanity checks for sized
deallocation and this wasn't updated to handle the introduction of
performing size class rounding for large sizes.
2020-11-10 13:53:32 -05:00
Daniel Micay
8d0314295e support Android's logging system for fatal_error 2020-10-19 07:51:00 -04:00
Daniel Micay
b072022022 perform init sanity checks before MPK unsealing 2020-10-06 17:34:35 -04:00
Daniel Micay
2bb1c39d31 add MPK support for stats retrieval functions 2020-10-06 17:32:25 -04:00
Daniel Micay
0bf18b7c26 optimize malloc_usable_size enforce_init 2020-10-03 15:10:49 -04:00
Daniel Micay
178d4f320f harden checks for uninitialized usage 2020-10-02 15:06:29 -04:00
Daniel Micay
b9ebf47c7c explicitly use python3 to run tests 2020-09-19 09:40:56 -04:00
Daniel Micay
8906c0941a improve mallinfo test 2020-09-18 11:38:06 -04:00
Daniel Micay
59e174eee0 update stats documentation 2020-09-17 17:44:01 -04:00
Daniel Micay
483b1d7b8b empty malloc_info output when stats are disabled 2020-09-17 17:42:18 -04:00
Daniel Micay
96eca21ac5 remove thread_local macro workaround glibc < 2.28 2020-09-17 17:38:40 -04:00
Daniel Micay
022b64791e whitespace fixes 2020-09-17 17:23:13 -04:00
Daniel Micay
b4bbd09f07 change label for quarantined large allocations 2020-09-17 16:56:01 -04:00
Daniel Micay
a88305c01b support disabling region quarantine 2020-09-17 16:53:34 -04:00
Daniel Micay
85c5c3736c add stats tracking to special large realloc paths 2020-09-17 16:29:13 -04:00
Daniel Micay
96a9bcf3a1 move deprecated glibc extensions to the bottom 2020-09-17 16:20:05 -04:00
Daniel Micay
41fb89517a simplify malloc_info code 2020-09-17 16:10:02 -04:00
Daniel Micay
50e0f1334c add is_init check to malloc_info 2020-09-17 16:07:10 -04:00
Daniel Micay
9fb2791af2 add is_init check to h_mallinfo_arena_info 2020-09-17 16:00:03 -04:00
anupritaisno1
8974af86d1 hardened malloc: iterate -> malloc_iterate
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
2020-09-15 00:37:23 -04:00
anupritaisno1
d203d6c445 Android.bp: export hardened malloc headers
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
2020-09-14 07:21:57 -04:00
Daniel Micay
9f5e1f6eb9 master is only going to support Android 11 2020-09-14 05:57:39 -04:00
Daniel Micay
1cba254452 move external API to include directory 2020-09-14 05:52:53 -04:00
anupritaisno1
730f148647 Android.bp: make hardened malloc ramdisk available
Signed-off-by: anupritaisno1 <www.anuprita804@gmail.com>
2020-09-13 05:14:25 -04:00
Daniel Micay
dd7291ebfe better wording for page size mismatch error 2020-08-05 18:10:53 -04:00
Daniel Micay
bcb93cab63 avoid an ifdef 2020-08-04 17:22:03 -04:00
rwarr627
f214bd541a added check for if small allocations are free 2020-06-17 23:29:30 -04:00
rwarr627
7804e263e9 added tests for if malloc_object_size small allocations are free 2020-06-17 23:29:30 -04:00
Daniel Micay
de3fb50dcc tests: make no-optimize attribute Clang compatible 2020-06-17 20:08:46 -04:00
Daniel Micay
b404d6da6e fix out-of-memory check in offset test 2020-06-17 16:27:59 -04:00
Daniel Micay
c9c7dca498 use size_t in offset test to fix warning 2020-06-17 16:26:08 -04:00
Daniel Micay
dcc80a01db android10-qpr3-release 2020-06-16 11:10:13 -04:00
Daniel Micay
722974f4e9 remove trailing whitespace 2020-06-13 09:59:50 -04:00
rwarr627
195bc8c92a added tests for malloc_object_size
LDFLAGS is on single line
2020-06-13 01:27:32 -04:00
rwarr627
577524798e calculates offset from start for small allocations 2020-06-13 01:27:32 -04:00
Daniel Micay
467ba8440f add comment explaining slab cache size 2020-05-24 09:36:43 -04:00
Daniel Micay
067b3c864f set slab cache sizes based on the largest slab 2020-05-24 09:31:02 -04:00
Daniel Micay
82440e78d9 silence annoying tidy checks 2020-05-18 19:10:14 -04:00
Daniel Micay
fc0bd78215 default number of arenas is currently 4 2020-05-13 03:48:44 -04:00
Daniel Micay
08a5f5ee0b reduces empty slab cache size now too 2020-05-13 03:19:17 -04:00
Daniel Micay
e82367e1bf include leaner sample configurations 2020-05-13 03:11:23 -04:00
Daniel Micay
4a6bbe445c limit cached slabs based on max size class 2020-05-13 01:05:37 -04:00
Daniel Micay
cf55ac0f6d disable annoying Clang warning from avoiding ifdef 2020-04-30 18:14:40 -04:00
Daniel Micay
b672316bc7 use const for memory_corruption_check_small
This currently causes a warning (treated as an error) on Android where
malloc_usable_size uses a const pointer.
2020-04-30 16:06:32 -04:00
Daniel Micay
029a2edf28 remove trailing whitespace 2020-04-30 16:03:45 -04:00
rwarr627
35bd7cd76d added memory corruption checking to malloc_usable_size for slab allocations 2020-04-29 18:06:15 -04:00
rwarr627
0a3a726c93 added tests for malloc_usable_size 2020-04-29 18:06:15 -04:00
Daniel Micay
19365c25d6 remove workaround for Linux kernel MPK fork bug 2020-04-24 02:51:39 -04:00
Daniel Micay
c75dcb9d9c compare with negative integers to check signals 2020-04-11 15:26:24 -04:00