Ruby: Remove assert in RubyPort retry list logic stable_2015_09_03
authorJason Power <power.jg@gmail.com>
Thu, 25 Jun 2015 16:58:28 +0000 (11:58 -0500)
committerJason Power <power.jg@gmail.com>
Thu, 25 Jun 2015 16:58:28 +0000 (11:58 -0500)
Remove the assert when adding a port to the RubyPort retry list.
Instead of asserting, just ignore the added port, since it's
already on the list.
Without this patch, Ruby+detailed fails for even the simplest tests

src/mem/ruby/system/RubyPort.hh

index 2fb31ca092e37c3f49dc4584f7adb63680dbe16c..e68af6dab3f30c6d002a8e0e173757795dbc66eb 100644 (file)
@@ -188,8 +188,8 @@ class RubyPort : public MemObject
   private:
     void addToRetryList(MemSlavePort * port)
     {
-        assert(std::find(retryList.begin(), retryList.end(), port) ==
-               retryList.end());
+        if (std::find(retryList.begin(), retryList.end(), port) !=
+               retryList.end()) return;
         retryList.push_back(port);
     }