From 4f3139e69647fdd67dd5604ff350e63d38f9306f Mon Sep 17 00:00:00 2001 From: Tony Gutierrez Date: Fri, 6 May 2016 16:44:38 -0400 Subject: [PATCH] gpu-compute: fix uninitialized member bug in GPUDynInst the n_reg field in the GPUDynInst is not currently set in the constructor. if it is not set externally, there are assertion failures that may occur if the random value it gets is just right. here we set it to 0 by default. --- src/gpu-compute/gpu_dyn_inst.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gpu-compute/gpu_dyn_inst.cc b/src/gpu-compute/gpu_dyn_inst.cc index 83e348dbe..594e45907 100644 --- a/src/gpu-compute/gpu_dyn_inst.cc +++ b/src/gpu-compute/gpu_dyn_inst.cc @@ -43,7 +43,7 @@ GPUDynInst::GPUDynInst(ComputeUnit *_cu, Wavefront *_wf, GPUStaticInst *_staticInst, uint64_t instSeqNum) : GPUExecContext(_cu, _wf), m_op(Enums::MO_UNDEF), - memoryOrder(Enums::MEMORY_ORDER_NONE), useContinuation(false), + memoryOrder(Enums::MEMORY_ORDER_NONE), n_reg(0) ,useContinuation(false), statusBitVector(0), staticInst(_staticInst), _seqNum(instSeqNum) { tlbHitLevel.assign(VSZ, -1); -- 2.30.2