mem-cache: Initialize all members of `QueuedPrefetcher::DeferredPacket`.
authorIsaac Sánchez Barrera <isaac.sanchez@bsc.es>
Fri, 15 Nov 2019 15:17:23 +0000 (16:17 +0100)
committerIsaac Sánchez Barrera <isaac.sanchez@bsc.es>
Mon, 18 Nov 2019 11:10:21 +0000 (11:10 +0000)
Members `tc` and `ongoingTranslation` were uninitialized in the constructor for
`QueuedPrefetcher::DeferredPacket`. If `ongoingTranslation` is not initialized to
`false` by default, some translation requests from queued prefetchers are not
properly handled and executions are nondeterministic.

Change-Id: Ia278f9e74847d6b847984d47f6a45643bae57794
Signed-off-by: Isaac Sánchez Barrera <isaac.sanchez@bsc.es>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22844
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Maintainer: Nikos Nikoleris <nikos.nikoleris@arm.com>
Tested-by: kokoro <noreply+kokoro@google.com>
src/mem/cache/prefetch/queued.hh

index ae4c5e4adfe4d40de1ae54a78a5d69a0de2ad153..adcd255ba4d0f7da422ba9814c3720f4c19e98cb 100644 (file)
@@ -80,7 +80,8 @@ class QueuedPrefetcher : public BasePrefetcher
          */
         DeferredPacket(QueuedPrefetcher *o, PrefetchInfo const &pfi, Tick t,
             int32_t prio) : owner(o), pfInfo(pfi), tick(t), pkt(nullptr),
-            priority(prio), translationRequest() {
+            priority(prio), translationRequest(), tc(nullptr),
+            ongoingTranslation(false) {
         }
 
         bool operator>(const DeferredPacket& that) const