Skip to content
Snippets Groups Projects
Commit 175a026f authored by Ballabriga Clément's avatar Ballabriga Clément
Browse files

Fix crash in dumpcft

parent 7a54468f
No related branches found
No related tags found
No related merge requests found
......@@ -135,7 +135,15 @@ int main(int argc, char **argv) {
fix_virtualized_loopinfo(entry);
FILE *pwf_file = fopen(argv[2], "w");
long long *loop_bounds = (long long*) malloc(sizeof(long long)*max_loop_id + 1);
for (CFGCollection::Iter iter(*coll); iter(); iter ++)
for (CFG::BlockIter iter2((*iter)->blocks()); iter2(); iter2++)
if (LOOP_HEADER(*iter2))
if ((*iter2)->id() > max_loop_id)
max_loop_id = (*iter2)->id();
long long *loop_bounds = (long long*) malloc(sizeof(long long)*(max_loop_id + 1));
for (int i = 0; i <= max_loop_id; i++)
loop_bounds[i] = -1;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment