Merge remote-tracking branch 'upstream/master'
This commit is contained in:
commit
9396f00bfc
@ -122,6 +122,10 @@ void x86_reg_reset(uch handle)
|
|||||||
switch(uc->mode) {
|
switch(uc->mode) {
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
|
case UC_MODE_16:
|
||||||
|
env->hflags = 0;
|
||||||
|
env->cr[0] = 0;
|
||||||
|
break;
|
||||||
case UC_MODE_32:
|
case UC_MODE_32:
|
||||||
env->hflags |= HF_CS32_MASK | HF_SS32_MASK | HF_OSFXSR_MASK;
|
env->hflags |= HF_CS32_MASK | HF_SS32_MASK | HF_OSFXSR_MASK;
|
||||||
env->cr[0] = CR0_PE_MASK; // protected mode
|
env->cr[0] = CR0_PE_MASK; // protected mode
|
||||||
|
@ -18,7 +18,7 @@ void cb_hookblock(uch handle, uint64_t address, uint32_t size, void *user_data)
|
|||||||
fprintf(stderr, "not ok %d - address != 0x1000000 && address != 0x1000200\n", count++);
|
fprintf(stderr, "not ok %d - address != 0x1000000 && address != 0x1000200\n", count++);
|
||||||
_exit(1);
|
_exit(1);
|
||||||
}
|
}
|
||||||
fprintf(stderr, "ok %d - address (0x%x) is start of basic block\n", count++, address);
|
fprintf(stderr, "ok %d - address (0x%x) is start of basic block\n", count++, (uint32_t)address);
|
||||||
if (size != 0x200) {
|
if (size != 0x200) {
|
||||||
fprintf(stderr, "not ok %d - basic block size != 0x200\n", count++);
|
fprintf(stderr, "not ok %d - basic block size != 0x200\n", count++);
|
||||||
_exit(1);
|
_exit(1);
|
||||||
|
6
regress/memmap_segfault2.py
Normal file
6
regress/memmap_segfault2.py
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
from unicorn import *
|
||||||
|
uc = Uc(UC_ARCH_X86, UC_MODE_32)
|
||||||
|
uc.mem_map(0x0000, 0x2000)
|
||||||
|
uc.mem_map(0x2000, 0x4000)
|
||||||
|
uc.mem_write(0x1000, 0x1004 * ' ')
|
||||||
|
print 'Not reached on x86_64 Linux.'
|
Loading…
Reference in New Issue
Block a user