mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 01:45:31 +00:00
fix issue #1
This commit is contained in:
parent
f9b9dfbce9
commit
761fd3d13b
11
regress/deadlock_1.py
Executable file
11
regress/deadlock_1.py
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/python
|
||||
# From issue #1 of Ryan Hileman
|
||||
|
||||
from unicorn import *
|
||||
|
||||
CODE = b"\x90\x91\x92"
|
||||
|
||||
mu = Uc(UC_ARCH_X86, UC_MODE_64)
|
||||
mu.mem_map(0x100000, 4 * 1024)
|
||||
mu.mem_write(0x100000, CODE)
|
||||
mu.emu_start(0x100000, 0x1000 + len(CODE))
|
2
uc.c
2
uc.c
|
@ -554,7 +554,7 @@ uc_err uc_mem_map(uch handle, uint64_t address, size_t size)
|
|||
|
||||
// align to 8KB boundary
|
||||
map_begin[map_count] = address & (~ (8*1024 - 1));
|
||||
s = (size + 8*1024 - 1) & (~ (8*1024));
|
||||
s = (size + 8*1024 - 1) & (~ (8*1024 - 1));
|
||||
map_end[map_count] = s + map_begin[map_count];
|
||||
uc->memory_map(uc, map_begin[map_count], s);
|
||||
map_count++;
|
||||
|
|
Loading…
Reference in a new issue