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
[mc] Use std::string for request_get_dot_output() and s_mc_global_t::prev_req
[simgrid.git]
/
src
/
mc
/
CommunicationDeterminismChecker.cpp
diff --git
a/src/mc/CommunicationDeterminismChecker.cpp
b/src/mc/CommunicationDeterminismChecker.cpp
index
15f19f0
..
da1b86e
100644
(file)
--- a/
src/mc/CommunicationDeterminismChecker.cpp
+++ b/
src/mc/CommunicationDeterminismChecker.cpp
@@
-409,7
+409,7
@@
int CommunicationDeterminismChecker::main(void)
simgrid::mc::request_to_string(
req, value, simgrid::mc::RequestType::simix).c_str());
simgrid::mc::request_to_string(
req, value, simgrid::mc::RequestType::simix).c_str());
-
char* req_str = nullp
tr;
+
std::string req_s
tr;
if (dot_output != nullptr)
req_str = simgrid::mc::request_get_dot_output(req, value);
if (dot_output != nullptr)
req_str = simgrid::mc::request_get_dot_output(req, value);
@@
-452,17
+452,15
@@
int CommunicationDeterminismChecker::main(void)
MC_state_interleave_process(next_state.get(), &p.copy);
if (dot_output != nullptr)
MC_state_interleave_process(next_state.get(), &p.copy);
if (dot_output != nullptr)
- fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n", state->num, next_state->num, req_str);
+ fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n",
+ state->num, next_state->num, req_str.c_str());
} else if (dot_output != nullptr)
fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n",
} else if (dot_output != nullptr)
fprintf(dot_output, "\"%d\" -> \"%d\" [%s];\n",
- state->num, visited_state->other_num == -1 ? visited_state->num : visited_state->other_num, req_str);
+ state->num, visited_state->other_num == -1 ? visited_state->num : visited_state->other_num, req_str
.c_str()
);
stack_.push_back(std::move(next_state));
stack_.push_back(std::move(next_state));
- if (dot_output != nullptr)
- xbt_free(req_str);
-
} else {
if (stack_.size() > (std::size_t) _sg_mc_max_depth)
} else {
if (stack_.size() > (std::size_t) _sg_mc_max_depth)