add mem_map_large regression (for #223)

This commit is contained in:
Ryan Hileman 2015-11-11 22:05:52 -08:00
parent 2f297bdd3a
commit f93e342177
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