mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-07-09 12:50:45 +00:00
Merge branch 'master' of https://github.com/unicorn-engine/unicorn
This commit is contained in:
commit
86823f53da
|
@ -470,7 +470,7 @@ static void test_i386_invalid_mem_read(void)
|
||||||
uc_close(uc);
|
uc_close(uc);
|
||||||
}
|
}
|
||||||
|
|
||||||
// emulate code that read invalid memory
|
// emulate code that write invalid memory
|
||||||
static void test_i386_invalid_mem_write(void)
|
static void test_i386_invalid_mem_write(void)
|
||||||
{
|
{
|
||||||
uc_engine *uc;
|
uc_engine *uc;
|
||||||
|
@ -532,7 +532,7 @@ static void test_i386_invalid_mem_write(void)
|
||||||
if (!uc_mem_read(uc, 0xaaaaaaaa, &tmp, sizeof(tmp)))
|
if (!uc_mem_read(uc, 0xaaaaaaaa, &tmp, sizeof(tmp)))
|
||||||
printf(">>> Read 4 bytes from [0x%x] = 0x%x\n", 0xaaaaaaaa, tmp);
|
printf(">>> Read 4 bytes from [0x%x] = 0x%x\n", 0xaaaaaaaa, tmp);
|
||||||
else
|
else
|
||||||
printf(">>> Failed to read 4 bytes from [0x%x]\n", 0xffffffaa);
|
printf(">>> Failed to read 4 bytes from [0x%x]\n", 0xaaaaaaaa);
|
||||||
|
|
||||||
if (!uc_mem_read(uc, 0xffffffaa, &tmp, sizeof(tmp)))
|
if (!uc_mem_read(uc, 0xffffffaa, &tmp, sizeof(tmp)))
|
||||||
printf(">>> Read 4 bytes from [0x%x] = 0x%x\n", 0xffffffaa, tmp);
|
printf(">>> Read 4 bytes from [0x%x] = 0x%x\n", 0xffffffaa, tmp);
|
||||||
|
@ -850,7 +850,7 @@ static void test_x86_16(void)
|
||||||
uc_mem_map(uc, 0, 8 * 1024, UC_PROT_ALL);
|
uc_mem_map(uc, 0, 8 * 1024, UC_PROT_ALL);
|
||||||
|
|
||||||
// write machine code to be emulated to memory
|
// write machine code to be emulated to memory
|
||||||
if (uc_mem_write(uc, 0, X86_CODE16, sizeof(X86_CODE64) - 1)) {
|
if (uc_mem_write(uc, 0, X86_CODE16, sizeof(X86_CODE16) - 1)) {
|
||||||
printf("Failed to write emulation code to memory, quit!\n");
|
printf("Failed to write emulation code to memory, quit!\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue