nautilus-fuzz / nautilus

A grammar based feedback Fuzzer
MIT License
427 stars 64 forks source link

share memory config error #42

Closed BeneficialCode closed 1 year ago

BeneficialCode commented 1 year ago

If we change the bitmap_size in Config.rom, then the code will raise a index out of bounds panic. Cause you create_shm, then return a fixed size [u8;65536] array. image How can we solve this problem? I'm not familiar with rust.

BeneficialCode commented 1 year ago

The chatgpt tell me the answer. : )

let ptr: *mut u8 = trace_bits.cast();
(shm_id, std::slice::from_raw_parts_mut(ptr,bitmap_size))