Alex Richardson has submitted this change. (
https://gem5-review.googlesource.com/c/public/gem5/+/57249 )
Change subject: mem-cache: Avoid calling .front() on a possibly empty
std::list
......................................................................
mem-cache: Avoid calling .front() on a possibly empty std::list
In the call to MSHR::promoteWritable() the deferredTargets list can be
empty, so we should check that case before calling .front(). The new logic
matches MSHR::promoteReadable().
Change-Id: Ic1d05e42f32b2c02226ca88d2155225f592f667f
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/57249
Reviewed-by: Daniel Carvalho <oda...@yahoo.com.br>
Maintainer: Daniel Carvalho <oda...@yahoo.com.br>
Reviewed-by: Jason Lowe-Power <power...@gmail.com>
Tested-by: kokoro <noreply+kok...@google.com>
---
M src/mem/cache/mshr.cc
1 file changed, 21 insertions(+), 0 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved
Daniel Carvalho: Looks good to me, approved; Looks good to me, approved
kokoro: Regressions pass
diff --git a/src/mem/cache/mshr.cc b/src/mem/cache/mshr.cc
index 8477048..871125a 100644
--- a/src/mem/cache/mshr.cc
+++ b/src/mem/cache/mshr.cc
@@ -678,6 +678,9 @@
void
MSHR::promoteWritable()
{
+ if (deferredTargets.empty()) {
+ return;
+ }
PacketPtr def_tgt_pkt = deferredTargets.front().pkt;
if (deferredTargets.needsWritable &&
!(hasPostInvalidate() || hasPostDowngrade()) &&
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/57249
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: Ic1d05e42f32b2c02226ca88d2155225f592f667f
Gerrit-Change-Number: 57249
Gerrit-PatchSet: 2
Gerrit-Owner: Alex Richardson <alexrichard...@google.com>
Gerrit-Reviewer: Alex Richardson <alexrichard...@google.com>
Gerrit-Reviewer: Daniel Carvalho <oda...@yahoo.com.br>
Gerrit-Reviewer: Jason Lowe-Power <power...@gmail.com>
Gerrit-Reviewer: Nikos Nikoleris <nikos.nikole...@arm.com>
Gerrit-Reviewer: kokoro <noreply+kok...@google.com>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s