Switch from pipes to temporary file to store program output to get rid length limits.
[c11tester.git] / history.cc
index 3c000e7de06c20f2054610a96f7138db78d92745..c48835340bbe5c574ffb48970d5f215e20daa78c 100644 (file)
@@ -26,7 +26,11 @@ void ModelHistory::enter_function(const uint32_t func_id, thread_id_t tid)
                thrd_func_inst_lists = model->get_execution()->get_thrd_func_inst_lists();
 
        if ( thrd_func_list->size() <= id ) {
+               uint oldsize = thrd_func_list->size();
                thrd_func_list->resize( id + 1 );
+               for(uint i=oldsize;i<id+1;i++) {
+                       new(&(*thrd_func_list)[i]) func_id_list_t();
+               }
                thrd_func_inst_lists->resize( id + 1 );
        }
 
@@ -171,9 +175,9 @@ void ModelHistory::print()
                func_inst_list_mt * entry_insts = func_node->get_entry_insts();
                model_print("function %s has entry actions\n", func_node->get_func_name());
 
-               func_inst_list_mt::iterator it;
-               for (it = entry_insts->begin();it != entry_insts->end();it++) {
-                       FuncInst *inst = *it;
+               mllnode<FuncInst*>* it;
+               for (it = entry_insts->begin();it != NULL;it=it->getNext()) {
+                       FuncInst *inst = it->getVal();
                        model_print("type: %d, at: %s\n", inst->get_type(), inst->get_position());
                }