From: Jason Power Date: Wed, 1 Aug 2012 22:07:34 +0000 (-0500) Subject: Ruby NetDest: add assert for bad element in netdest X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6721b3e325139fb4ace99d858f0bdec44ec6af1b;p=gem5.git Ruby NetDest: add assert for bad element in netdest --- diff --git a/src/mem/ruby/common/NetDest.cc b/src/mem/ruby/common/NetDest.cc index 2d070d33d..97788345c 100644 --- a/src/mem/ruby/common/NetDest.cc +++ b/src/mem/ruby/common/NetDest.cc @@ -38,6 +38,7 @@ NetDest::NetDest() void NetDest::add(MachineID newElement) { + assert(bitIndex(newElement.num) < m_bits[vecIndex(newElement)].getSize()); m_bits[vecIndex(newElement)].add(bitIndex(newElement.num)); }