Rename test -> tests (#66)

* rename test -> tests

* re-add ignored tests
This commit is contained in:
JP Smith
2017-03-13 14:06:36 -05:00
committed by GitHub
parent dd24878724
commit ca0bee2377
81 changed files with 7 additions and 7 deletions
+3
View File
@@ -0,0 +1,3 @@
How to run the test:
python SymbolicExecutor/main.py --offset 0 --workspace test --buffer "EBP-4" --size "4" tests/index_code/index_code.dmp
+49
View File
@@ -0,0 +1,49 @@
// compile with
// cl /Fe:index_code.exe index_code.c
//
// make memory dump with:
// .dump /ma index_code.dmp
//
#include <stdio.h>
typedef int(*my_callback)(int);
int say_zero(int a) {
printf("entry zero");
return a;
}
int say_one(int a) {
printf("entry one");
return a;
}
int say_two(int a) {
printf("entry two");
return a;
}
int say_three(int a) {
printf("entry three");
return a;
}
my_callback table[] = {
say_zero,
say_one,
say_two,
say_three};
int main(int argc, const char *argv[]) {
int index = 0;
printf("reading an index: ");
scanf("%d", &index);
// break for windbg
__debugbreak();
if(index > (int)(sizeof(table)/sizeof(table[0]))) {
printf("Invalid index\n");
} else {
my_callback out = table[index];
out(index);
}
return 0;
}
Binary file not shown.