From f93e34217751ea62c70d138afd1a43fcad774aef Mon Sep 17 00:00:00 2001 From: Ryan Hileman Date: Wed, 11 Nov 2015 22:05:52 -0800 Subject: [PATCH] add mem_map_large regression (for #223) --- tests/regress/Makefile | 1 + tests/regress/mem_map_large.c | 17 +++++++++++++++++ tests/regress/regress.sh | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 tests/regress/mem_map_large.c diff --git a/tests/regress/Makefile b/tests/regress/Makefile index d056e4d6..759adeab 100644 --- a/tests/regress/Makefile +++ b/tests/regress/Makefile @@ -15,6 +15,7 @@ TESTS += mips_kseg0_1 TESTS += eflags_nosync TESTS += 00opcode_uc_crash TESTS += eflags_noset +TESTS += mem_map_large all: $(TESTS) diff --git a/tests/regress/mem_map_large.c b/tests/regress/mem_map_large.c new file mode 100644 index 00000000..33f754a4 --- /dev/null +++ b/tests/regress/mem_map_large.c @@ -0,0 +1,17 @@ +#include +#include + +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; +} diff --git a/tests/regress/regress.sh b/tests/regress/regress.sh index f0b79900..8151c81d 100755 --- a/tests/regress/regress.sh +++ b/tests/regress/regress.sh @@ -10,4 +10,4 @@ ./mem_unmap ./mem_protect ./mem_exec - +./mem_map_large