mimalloc-bench icon indicating copy to clipboard operation
mimalloc-bench copied to clipboard

Add a security benchmark

Open jvoisin opened this issue 3 years ago • 0 comments

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

jvoisin avatar Jul 21 '22 11:07 jvoisin