Skip to content

Commit df863e2

Browse files
fuzzers: Use mimalloc and scudo in QEMU fuzzers
1 parent 4d9a895 commit df863e2

File tree

15 files changed

+2652
-1067
lines changed

15 files changed

+2652
-1067
lines changed

fuzzers/binary_only/fuzzbench_fork_qemu/Cargo.lock

Lines changed: 563 additions & 234 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

fuzzers/binary_only/fuzzbench_fork_qemu/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,5 @@ libafl_targets = { path = "../../../crates/libafl_targets" }
3434
log = { version = "0.4.22", features = ["release_max_level_info"] }
3535
clap = { version = "4.5.18", features = ["default"] }
3636
env_logger = "0.11.7"
37+
mimalloc = "0.1.48"
38+
scudo = "0.1.3"

fuzzers/binary_only/fuzzbench_fork_qemu/src/fuzzer.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ use libafl_qemu::{
5959
};
6060
use libafl_targets::{CMPLOG_MAP_PTR, EDGES_MAP_DEFAULT_SIZE};
6161

62+
#[cfg(all(not(miri), debug_assertions))]
63+
#[global_allocator]
64+
static GLOBAL: scudo::GlobalScudoAllocator = scudo::GlobalScudoAllocator;
65+
66+
#[cfg(all(not(miri), not(debug_assertions)))]
67+
#[global_allocator]
68+
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
69+
6270
/// The fuzzer main
6371
pub fn main() {
6472
// Registry the metadata types used in this fuzzer

0 commit comments

Comments
 (0)