A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
model-checker : move functions about snapshot comparison in a separate file mc_compare.c
[simgrid.git]
/
src
/
mc
/
test
/
compare_snapshot.c
diff --git
a/src/mc/test/compare_snapshot.c
b/src/mc/test/compare_snapshot.c
index
b97a629
..
d8ad53b
100644
(file)
--- a/
src/mc/test/compare_snapshot.c
+++ b/
src/mc/test/compare_snapshot.c
@@
-49,8
+49,9
@@
static void test2()
MC_UNSET_RAW_MEM;
MC_UNSET_RAW_MEM;
- char* t = malloc(5);
-
+ char* t = malloc(50);
+ t = strdup("toto");
+
MC_SET_RAW_MEM;
/* Save second snapshot */
MC_SET_RAW_MEM;
/* Save second snapshot */
@@
-88,6
+89,7
@@
static void test3()
MC_UNSET_RAW_MEM;
char *t = malloc(5);
MC_UNSET_RAW_MEM;
char *t = malloc(5);
+ t = strdup("toto");
free(t);
MC_SET_RAW_MEM;
free(t);
MC_SET_RAW_MEM;
@@
-117,6
+119,7
@@
static void test4()
fprintf(stderr, "\n**************** TEST 4 ****************\n\n");
char *t = malloc(5);
fprintf(stderr, "\n**************** TEST 4 ****************\n\n");
char *t = malloc(5);
+ t = strdup("toto");
MC_SET_RAW_MEM;
MC_SET_RAW_MEM;
@@
-237,6
+240,9
@@
void MC_test_snapshot_comparison(){
MC_take_snapshot_liveness(initial);
MC_UNSET_RAW_MEM;
MC_take_snapshot_liveness(initial);
MC_UNSET_RAW_MEM;
+ /* Get .plt section (start and end addresses) for data libsimgrid comparison */
+ get_plt_section();
+
test1();
MC_restore_snapshot(initial);
test1();
MC_restore_snapshot(initial);