Skip to content
Snippets Groups Projects
Commit a1783888 authored by an7s's avatar an7s
Browse files

Added test

parent c31f3682
No related branches found
No related tags found
No related merge requests found
......@@ -144,6 +144,7 @@ beaengine/obj/Linux.gnu.Debug/beaengineSources/CMakeFiles/progress.marks -text
examples/Makefile -text
examples/dumbledore.c -text
examples/dumbledore_cmd.c -text
examples/overflow1.c -text
examples/test1.c -text
libIRDB/Makefile -text
libIRDB/include/address.hpp -text
......
......@@ -6,14 +6,17 @@ LD=DO_NOT_USE
.SUFFIXES: .o .c .cpp .exe
#exes=dumbledore_cmd.exe test1.exe
exes=test1.exe
exes=overflow1.exe #overflow2.exe
#exes=dumbledore_cmd.exe
all: env_check ${exes}
.PHONY: env_check
.o.exe:
${PEASOUP_HOME}/tools/ps_link.sh $< -o $@
# ${PEASOUP_HOME}/tools/ps_link.sh $< -o $@
gcc $< -o $@
${PEASOUP_HOME}/tools/ps_analyze.sh $@ $@
.c.o:
......@@ -50,6 +53,8 @@ clean:
rm -Rf peasoup_executable_directory.*
rm -f strata.log.*
rm -f *.sym
${PEASOUP_HOME}/tools/db/drop_my_tables.sh
${PEASOUP_HOME}/tools/db/pdb_setup.sh
concclean:
rm -Rf concolic.files_*
......
int test_mul32_overflow(int value)
{
printf("tests_mul32_overflow(%d): enter\n", value);
int result = value * 2000000;
printf("tests_mul32_overflow -- about to exit\n");
return result;
}
char *test_sign_unsign(int size)
{
return malloc(size * 1024);
}
int main(int argc, char **argv)
{
printf("main(): enter\n");
int value = atoi(argv[1]);
printf("value_overflow=%d\n", test_mul32_overflow(value));
char *x = test_sign_unsign(value);
sprintf(x,"x");
printf("x=%s\n", x);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment