cpu: fix unitialized variable which may cause assertion failure
authorPau Cabre <pau.cabre@metempsy.com>
Fri, 4 Dec 2015 23:54:03 +0000 (17:54 -0600)
committerPau Cabre <pau.cabre@metempsy.com>
Fri, 4 Dec 2015 23:54:03 +0000 (17:54 -0600)
The assert in lsq_unit_impl.hh line 963 needs pktPending to be initialized to
NULL (I got the assertion failure several times without the fix).

Committed by: Nilay Vaish <nilay@cs.wisc.edu>

src/cpu/o3/lsq_unit_impl.hh

index 0377faffa1e43672109c2ea8e1e95c4e886e06e6..288f6271e3d7099475e6466246eea57175f221e0 100644 (file)
@@ -143,7 +143,8 @@ LSQUnit<Impl>::completeDataAccess(PacketPtr pkt)
 template <class Impl>
 LSQUnit<Impl>::LSQUnit()
     : loads(0), stores(0), storesToWB(0), cacheBlockMask(0), stalled(false),
-      isStoreBlocked(false), storeInFlight(false), hasPendingPkt(false)
+      isStoreBlocked(false), storeInFlight(false), hasPendingPkt(false),
+      pendingPkt(nullptr)
 {
 }