diff options
author | Gabe Black <gblack@eecs.umich.edu> | 2012-02-07 04:44:01 -0800 |
---|---|---|
committer | Gabe Black <gblack@eecs.umich.edu> | 2012-02-07 04:44:01 -0800 |
commit | a6246bb047a0527590519c35a5ffbd660c680991 (patch) | |
tree | 15be315af83d5312811479a9ae9d672d08241ef1 | |
parent | f2b46fdb850dca0e2ac3a97343292a7d92ff980e (diff) | |
download | gem5-a6246bb047a0527590519c35a5ffbd660c680991.tar.xz |
Checker: Access workload element 0 only if there is an element 0.
-rw-r--r-- | src/cpu/checker/cpu.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cpu/checker/cpu.cc b/src/cpu/checker/cpu.cc index c905c62eb..372d00c6f 100644 --- a/src/cpu/checker/cpu.cc +++ b/src/cpu/checker/cpu.cc @@ -84,7 +84,8 @@ CheckerCPU::CheckerCPU(Params *p) systemPtr = NULL; workload = p->workload; // XXX: This is a hack to get this to work some - thread = new SimpleThread(this, /* thread_num */ 0, workload[0], itb, dtb); + thread = new SimpleThread(this, /* thread_num */ 0, + workload.size() ? workload[0] : NULL, itb, dtb); tc = thread->getTC(); threadContexts.push_back(tc); |