From 0ed9dc6d80922836b08562c9e01b99883715c6e2 Mon Sep 17 00:00:00 2001 From: Andrea Fioraldi Date: Mon, 18 Oct 2021 10:56:39 +0200 Subject: [PATCH] Panic message in the map feedback --- libafl/src/feedbacks/map.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libafl/src/feedbacks/map.rs b/libafl/src/feedbacks/map.rs index fa6734e2af..2df46acb95 100644 --- a/libafl/src/feedbacks/map.rs +++ b/libafl/src/feedbacks/map.rs @@ -4,7 +4,7 @@ use alloc::{ string::{String, ToString}, vec::Vec, }; -use core::marker::PhantomData; +use core::{marker::PhantomData}; use num::Integer; use serde::{Deserialize, Serialize}; @@ -242,7 +242,9 @@ where .match_name_mut::>(&self.name) .unwrap(); - assert!(size <= map_state.history_map.len()); + if size > map_state.history_map.len() { + panic!("The size of the associated map observer cannot exceed the size of the history map of the feedback. If you are running multiple instances of slightly different fuzzers (e.g. one with ASan and another without) synchronized using LLMP please check the `configuration` field of the LLMP manager."); + } assert!(size <= observer.map().len()); if self.novelties.is_some() {