Do not crash with dirty init

This commit is contained in:
Julien Cretin
2020-11-30 10:29:18 +01:00
parent 44b35169af
commit f548a35f01
3 changed files with 24 additions and 13 deletions

View File

@@ -133,7 +133,7 @@ impl<'a> Fuzzer<'a> {
page_size: 1 << self.entropy.read_range(5, 12),
max_word_writes: 2,
max_page_erases: self.entropy.read_range(0, 50000),
strict_write: true,
strict_mode: true,
};
let num_pages = self.entropy.read_range(3, 64);
self.record(StatKey::PageSize, options.page_size);
@@ -156,7 +156,7 @@ impl<'a> Fuzzer<'a> {
if self.debug {
println!("Start with dirty storage.");
}
options.strict_write = false;
options.strict_mode = false;
let storage = BufferStorage::new(storage, options);
StoreDriver::Off(StoreDriverOff::new_dirty(storage))
} else if self.entropy.read_bit() {