mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2024-12-23 10:55:34 +00:00
Merge pull request #260 from lunixbochs/master
add mem_map_large regression (for #223)
This commit is contained in:
commit
d92d6791b9
|
@ -15,6 +15,7 @@ TESTS += mips_kseg0_1
|
|||
TESTS += eflags_nosync
|
||||
TESTS += 00opcode_uc_crash
|
||||
TESTS += eflags_noset
|
||||
TESTS += mem_map_large
|
||||
|
||||
all: $(TESTS)
|
||||
|
||||
|
|
17
tests/regress/mem_map_large.c
Normal file
17
tests/regress/mem_map_large.c
Normal file
|
@ -0,0 +1,17 @@
|
|||
#include <unicorn/unicorn.h>
|
||||
#include <stdio.h>
|
||||
|
||||
int main() {
|
||||
uc_engine *u;
|
||||
uc_err err;
|
||||
if ((err = uc_open(UC_ARCH_X86, UC_MODE_32, &u)) != UC_ERR_OK) {
|
||||
printf("uc_open() failed: %s\n", uc_strerror(err));
|
||||
}
|
||||
printf("Trying large map.\n");
|
||||
if ((err = uc_mem_map(u, 0x60802000, 0x28bd211200004000, UC_PROT_ALL)) != UC_ERR_OK) {
|
||||
printf("uc_mem_map() failed: %s\n", uc_strerror(err));
|
||||
return -1;
|
||||
}
|
||||
printf("Success.\n");
|
||||
return 0;
|
||||
}
|
|
@ -10,4 +10,4 @@
|
|||
./mem_unmap
|
||||
./mem_protect
|
||||
./mem_exec
|
||||
|
||||
./mem_map_large
|
||||
|
|
Loading…
Reference in a new issue