Andreas Sandberg has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/16004

Change subject: RFC: python: Fix unproxying issues
......................................................................

RFC: python: Fix unproxying issues

There are cases where the proxies get confused by certain constructs
where a proxy resolves to a proxy. In particular this seems to be
triggered when a Self proxy resolves to a proxy in the same object
(e.g., in the GIC). It seems like this bug depends on the graph
traversal order and it seems like it is only exposed in Python 3.

I have no idea if this change actually makes any sense, but it seems
to solve the issue for now.

Change-Id: Iea12cc138765e70bfd6bb776b1efa012364db066
Signed-off-by: Andreas Sandberg <andreas.sandb...@arm.com>
---
M src/python/m5/proxy.py
1 file changed, 5 insertions(+), 3 deletions(-)



diff --git a/src/python/m5/proxy.py b/src/python/m5/proxy.py
index 5128156..d289545 100644
--- a/src/python/m5/proxy.py
+++ b/src/python/m5/proxy.py
@@ -187,13 +187,15 @@
             if hasattr(val, '_visited'):
                 visited = getattr(val, '_visited')

-            if not visited:
+            if visited:
+                return None, False
+
+            if not isproxy(val):
                 # for any additional unproxying to be done, pass the
                 # current, rather than the original object so that proxy
                 # has the right context
                 obj = val
-            else:
-                return None, False
+
         except:
             return None, False
         while isproxy(val):

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/16004
To unsubscribe, or for help writing mail filters, visit https://gem5-review.googlesource.com/settings

Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: Iea12cc138765e70bfd6bb776b1efa012364db066
Gerrit-Change-Number: 16004
Gerrit-PatchSet: 1
Gerrit-Owner: Andreas Sandberg <andreas.sandb...@arm.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list
gem5-dev@gem5.org
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to