From 969274ffc6f6acb6a4fe83422e4779126c908fde Mon Sep 17 00:00:00 2001 From: webthethird Date: Wed, 28 Dec 2022 13:45:00 -0600 Subject: [PATCH] Compare struct element types as strings to avoid infinite loops from recursive structs --- slither/core/declarations/structure.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/slither/core/declarations/structure.py b/slither/core/declarations/structure.py index ce63352d1..3fe7db7e6 100644 --- a/slither/core/declarations/structure.py +++ b/slither/core/declarations/structure.py @@ -57,6 +57,6 @@ class Structure(SourceMapping): return False for idx, elem in enumerate(self.elems_ordered): other_elem = other.elems_ordered[idx] - if other_elem.type != elem.type or other_elem.name != elem.name: + if str(other_elem.type) != str(elem.type) or other_elem.name != elem.name: return False return self.name == other.name