From 7e19b26f503435f07dc4b5675061facc521b8c91 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Isaac=20S=C3=A1nchez=20Barrera?= Date: Fri, 15 Nov 2019 16:17:23 +0100 Subject: [PATCH] mem-cache: Initialize all members of `QueuedPrefetcher::DeferredPacket`. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/22844 Reviewed-by: Nikos Nikoleris Maintainer: Nikos Nikoleris Tested-by: kokoro --- src/mem/cache/prefetch/queued.hh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mem/cache/prefetch/queued.hh b/src/mem/cache/prefetch/queued.hh index ae4c5e4ad..adcd255ba 100644 --- a/src/mem/cache/prefetch/queued.hh +++ b/src/mem/cache/prefetch/queued.hh @@ -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 -- 2.30.2