Commit Graph

25 Commits

Author SHA1 Message Date
Daniel Micay
de7a3b6e5a enable sized deallocation for sized deletion test
Clang doesn't currently enable sized deallocation by default like GCC.
2022-01-01 23:18:52 -05:00
jvoisin
cff1d6d4b5 Add a test to prove that hardened_malloc handles too-large-to-be-true allocations
This pattern, used by https://github.com/kaist-hacking/HardsHeap,
uncovered bugs in other memory allocators.
2021-12-28 19:47:05 -05:00
Thibaut Sautereau
a33d2ca97d Fix CPPFLAGS in test Makefile
In particular, the _GNU_SOURCE feature test macro needs to be set in
order to correctly define mmap(2) flags such as MAP_ANONYMOUS.
Otherwise, compilation of some test files fails when CPPFLAGS is not
defined in the initial user environment, as Make then does not export it
from the root Makefile to the sub-make.
2021-11-02 16:13:09 -04:00
Thibaut Sautereau
76860c72e1 malloc_usable_size: clean abort on invalid region
It's the region pointer that can be NULL here, and p was checked at the
beginning of the function. Also fix the test accordingly.
2021-02-10 17:41:17 -05:00
Daniel Micay
022b64791e whitespace fixes 2020-09-17 17:23:13 -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
rwarr627
195bc8c92a added tests for malloc_object_size
LDFLAGS is on single line
2020-06-13 01:27:32 -04:00
rwarr627
0a3a726c93 added tests for malloc_usable_size 2020-04-29 18:06:15 -04:00
Daniel Micay
c75dcb9d9c compare with negative integers to check signals 2020-04-11 15:26:24 -04:00
Daniel Micay
d757835d90 increase size for eight_byte_overflow_large test
This was not working as expected due to CONFIG_EXTENDED_SIZE_CLASSES
resulting in 128k being a slab allocation size class. The addition of
padding for the canary pushes it into the next size class, resulting in
this writing over size class rounding padding rather than this actually
being an overflow as intended.
2020-04-11 15:25:34 -04:00
rwarr627
b160f723e0 ignores __pycache__ 2020-04-11 15:08:30 -04:00
rwarr627
6b987e644b verifies the results of the simple-memory-corruption tests 2020-04-11 15:08:30 -04:00
Daniel Micay
3cd3d34b3e extend gitignore for tests 2018-11-06 04:23:53 -05:00
Daniel Micay
e47c783524 add test for delete size mismatch 2018-10-11 01:45:47 -04:00
Daniel Micay
57d5ab769b add write-after-free tests with potential reuse 2018-10-08 17:41:06 -04:00
Daniel Micay
93fcc6a978 add simple string overflow test 2018-10-03 17:15:38 -04:00
Daniel Micay
918f0d3302 improve write-after-free tests 2018-09-06 23:50:49 -04:00
Daniel Micay
5017500a47 add simple overflow tests 2018-09-04 09:15:23 -04:00
Daniel Micay
35c9e6f16d add delayed double free tests 2018-08-24 05:53:17 -04:00
Daniel Micay
aaa4eeca4d add a clean target for the memory corruption tests 2018-08-24 05:25:52 -04:00
Daniel Micay
bde8c3c29b add another test for invalid small region frees 2018-08-24 05:09:33 -04:00
Daniel Micay
fe85116891 add uninitialized allocator tests 2018-08-24 05:03:12 -04:00
Daniel Micay
0a79e82474 add basic invalid free tests 2018-08-24 04:48:57 -04:00
Daniel Micay
27ac1e21bc add initial simple memory corruption tests 2018-08-24 03:13:50 -04:00