mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 10:45:28 +00:00
Merge pull request #360 from farmdve/fix_bugs2
Add some fixes to mem_unmap and mem_nofree tests.
This commit is contained in:
commit
399b4c2382
|
@ -5,8 +5,8 @@
|
||||||
|
|
||||||
#include <unicorn/unicorn.h>
|
#include <unicorn/unicorn.h>
|
||||||
|
|
||||||
#define ADDRESS1 0x1000000
|
#define ADDRESS1 0x10000000
|
||||||
#define ADDRESS2 0x2000000
|
#define ADDRESS2 0x20000000
|
||||||
#define SIZE (80 * 1024 * 1024)
|
#define SIZE (80 * 1024 * 1024)
|
||||||
|
|
||||||
static void VM_exec()
|
static void VM_exec()
|
||||||
|
|
|
@ -135,7 +135,7 @@ static bool hook_mem_invalid(uc_engine *uc, uc_mem_type type,
|
||||||
default:
|
default:
|
||||||
printf("not ok %d - memory invalid type: %d at 0x%" PRIx64 "\n", log_num++, type, addr);
|
printf("not ok %d - memory invalid type: %d at 0x%" PRIx64 "\n", log_num++, type, addr);
|
||||||
return false;
|
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);
|
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) {
|
if (uc_mem_read(uc, addr, &testval, sizeof(testval)) != UC_ERR_OK) {
|
||||||
|
|
Loading…
Reference in a new issue