Merge pull request #360 from farmdve/fix_bugs2

Add some fixes to mem_unmap and mem_nofree tests.
This commit is contained in:
Nguyen Anh Quynh 2016-01-06 00:04:52 +07:00
commit 399b4c2382
2 changed files with 3 additions and 3 deletions

View file

@ -5,8 +5,8 @@
#include <unicorn/unicorn.h>
#define ADDRESS1 0x1000000
#define ADDRESS2 0x2000000
#define ADDRESS1 0x10000000
#define ADDRESS2 0x20000000
#define SIZE (80 * 1024 * 1024)
static void VM_exec()

View file

@ -135,7 +135,7 @@ static bool hook_mem_invalid(uc_engine *uc, uc_mem_type type,
default:
printf("not ok %d - memory invalid type: %d at 0x%" PRIx64 "\n", log_num++, type, addr);
return false;
case UC_MEM_WRITE:
case UC_MEM_WRITE_UNMAPPED:
printf("# write to invalid memory at 0x%"PRIx64 ", data size = %u, data value = 0x%"PRIx64 "\n", addr, size, value);
if (uc_mem_read(uc, addr, &testval, sizeof(testval)) != UC_ERR_OK) {