Merge pull request #260 from lunixbochs/master

add mem_map_large regression (for #223)
This commit is contained in:
Nguyen Anh Quynh 2015-11-12 15:06:35 +08:00
commit d92d6791b9
3 changed files with 19 additions and 1 deletions

View file

@ -15,6 +15,7 @@ TESTS += mips_kseg0_1
TESTS += eflags_nosync
TESTS += 00opcode_uc_crash
TESTS += eflags_noset
TESTS += mem_map_large
all: $(TESTS)

View 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;
}

View file

@ -10,4 +10,4 @@
./mem_unmap
./mem_protect
./mem_exec
./mem_map_large