When executing a single instruction at the end of a page with the following page unmapped, unicorn will return a memory error (FETCH_UNMAPPED) instead of stopping.
The first call to check places the instruction 16 bytes from the end of the page. This is successfully executed. The second call to check places the instruction exactly at the page edge. This fails with an error, but the resulting unicorn state is correct. Unicorn should return Ok(()) here instead of an error.
When executing a single instruction at the end of a page with the following page unmapped, unicorn will return a memory error (
FETCH_UNMAPPED
) instead of stopping.This can be reproduced with:
Note how
emu_start
is called withcount
as1
.The first call to
check
places the instruction 16 bytes from the end of the page. This is successfully executed. The second call tocheck
places the instruction exactly at the page edge. This fails with an error, but the resulting unicorn state is correct. Unicorn should returnOk(())
here instead of an error.