Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add a prototype of security benchmark #155

Merged
merged 1 commit into from
Aug 11, 2022
Merged

Add a prototype of security benchmark #155

merged 1 commit into from
Aug 11, 2022

Conversation

jvoisin
Copy link
Collaborator

@jvoisin jvoisin commented Aug 10, 2022

See #153 for details/motivation. It looks like this:

$ ~/dev/mimalloc-bench/out/bench ../../bench.sh security alla
benchmarking on 4096 cores.
use '-h' or '--help' for help on configuration options.

allocators:  sys iso mi mi-sec
tests     :  security
(excluded tests:  lean lean-mathlib)

---- 1: security

run 1: security sys: SYSMALLOC=1 

run 1: security iso: LD_PRELOAD=/home/jvoisin/dev/mimalloc-bench/extern/iso/build/libisoalloc.so 

run 1: security mi: LD_PRELOAD=/home/jvoisin/dev/mimalloc-bench/extern/mimalloc/out/release/libmimalloc.so 

run 1: security mi-sec: LD_PRELOAD=/home/jvoisin/dev/mimalloc-bench/extern/mimalloc/out/secure/libmimalloc-secure.so 
iso
[+] security/double_free_large
[+] security/double_free_large_delayed
[+] security/double_free_large_interleaved
[+] security/double_free_small
[+] security/double_free_small_delayed
[+] security/double_free_small_interleaved
[+] security/executable_heap
[+] security/invalid_free_alloca
[+] security/invalid_free
[+] security/invalid_free_stack
[+] security/malloc_reuse
[+] security/one_byte_underflow_big
[-] security/one_byte_underflow_small
[+] security/read_zero_size
[+] security/unaligned_free_large
[+] security/unaligned_free_small
[-] security/use_after_free_large
[-] security/use_after_free_small
[+] security/write_zero_size
[-] security/zero_after_free_large
[-] security/zero_after_free_small
[+] security/zero_on_malloc_large
[+] security/zero_on_malloc_small

mi
[-] security/double_free_large
[-] security/double_free_large_delayed
[-] security/double_free_large_interleaved
[-] security/double_free_small
[-] security/double_free_small_delayed
[-] security/double_free_small_interleaved
[+] security/executable_heap
[+] security/invalid_free_alloca
[-] security/invalid_free
[+] security/invalid_free_stack
[+] security/malloc_reuse
[-] security/one_byte_underflow_big
[-] security/one_byte_underflow_small
[-] security/read_zero_size
[-] security/unaligned_free_large
[-] security/unaligned_free_small
[-] security/use_after_free_large
[-] security/use_after_free_small
[-] security/write_zero_size
[-] security/zero_after_free_large
[+] security/zero_after_free_small
[+] security/zero_on_malloc_large
[-] security/zero_on_malloc_small

mi-sec
[-] security/double_free_large
[-] security/double_free_large_delayed
[-] security/double_free_large_interleaved
[-] security/double_free_small
[-] security/double_free_small_delayed
[-] security/double_free_small_interleaved
[+] security/executable_heap
[-] security/invalid_free_alloca
[-] security/invalid_free
[-] security/invalid_free_stack
[+] security/malloc_reuse
[-] security/one_byte_underflow_big
[+] security/one_byte_underflow_small
[-] security/read_zero_size
[-] security/unaligned_free_large
[-] security/unaligned_free_small
[-] security/use_after_free_large
[-] security/use_after_free_small
[-] security/write_zero_size
[-] security/zero_after_free_large
[-] security/zero_after_free_small
[+] security/zero_on_malloc_large
[+] security/zero_on_malloc_small

sys
[+] security/double_free_large
[+] security/double_free_large_delayed
[+] security/double_free_large_interleaved
[+] security/double_free_small
[+] security/double_free_small_delayed
[+] security/double_free_small_interleaved
[+] security/executable_heap
[+] security/invalid_free_alloca
[+] security/invalid_free
[+] security/invalid_free_stack
[-] security/malloc_reuse
[-] security/one_byte_underflow_big
[-] security/one_byte_underflow_small
[-] security/read_zero_size
[+] security/unaligned_free_large
[+] security/unaligned_free_small
[+] security/use_after_free_large
[-] security/use_after_free_small
[-] security/write_zero_size
[+] security/zero_after_free_large
[-] security/zero_after_free_small
[-] security/zero_on_malloc_large
[-] security/zero_on_malloc_small

$ ~/dev/mimalloc-bench/out/bench 

cc @Maximus- @struct

@jvoisin jvoisin requested review from mjp41 and daanx August 10, 2022 15:03
@jvoisin jvoisin self-assigned this Aug 10, 2022
@mjp41
Copy link
Collaborator

mjp41 commented Aug 10, 2022

This is great to add, it has already pushed me to make one of the checks stricter to get a pass on this benchmark (microsoft/snmalloc#550), and also realised some bits that are less predictable than I would like. ;-)

So expect more PRs because of this.

Repository owner deleted a comment from mjp41 Aug 10, 2022
@jvoisin jvoisin marked this pull request as draft August 11, 2022 13:11
@jvoisin jvoisin marked this pull request as ready for review August 11, 2022 16:25
@jvoisin jvoisin merged commit 1fb4346 into daanx:master Aug 11, 2022
@jvoisin jvoisin deleted the add_security_bench branch August 11, 2022 19:28
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants