mimalloc-bench
mimalloc-bench copied to clipboard
Add a security benchmark
It would be nice to have a security-related benchmark, not focused on memory consumption or speed, but on the ability of allocators to detect and neuter memory corruptions. For example, allocators should instantly abort on double-free.
List of tests to add, for large, small and medium allocations:
- Double-free
- Double-free, delayed
- Impossibly large malloc
- Invalid free
- Overflow
- Read-after-free
- Read of a zero-sized allocation
- Unaligned free
- Uninitialized free
- Write-after-free
- Write of a zero-sized allocation
We should take inspiration from hardened_malloc's testsuite, and shellphish's how2heap