LSQ Unit: After deleting part of a split request, set it to NULL so that it
authorTimothy M. Jones <tjones1@inf.ed.ac.uk>
Thu, 22 Jul 2010 17:54:37 +0000 (18:54 +0100)
committerTimothy M. Jones <tjones1@inf.ed.ac.uk>
Thu, 22 Jul 2010 17:54:37 +0000 (18:54 +0100)
isn't accidentally deleted again later (causing a segmentation fault).

src/cpu/o3/lsq_unit.hh

index 7b8b1e2e33f27ba8999a4d73c9a60d92bc4ac752..c19a368d119c0d70e29236faff26067b1dffc096 100644 (file)
@@ -744,6 +744,8 @@ LSQUnit<Impl>::read(Request *req, Request *sreqLow, Request *sreqHigh,
                 delete fst_data_pkt;
                 delete snd_data_pkt->req;
                 delete snd_data_pkt;
+                sreqLow = NULL;
+                sreqHigh = NULL;
             }
 
             req = NULL;
@@ -769,6 +771,7 @@ LSQUnit<Impl>::read(Request *req, Request *sreqLow, Request *sreqHigh,
                 state->complete();
 
                 req = NULL;
+                sreqHigh = NULL;
 
                 lsq->setRetryTid(lsqID);
             }