Skip to content

Commit

Permalink
Type 1 check for INSTANCE DUMP blocks was slightly too strict
Browse files Browse the repository at this point in the history
  • Loading branch information
wdahlenburg committed Jul 13, 2021
1 parent ab921a7 commit 7789895
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pyhprof/references.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ def read_references(self, heap_dump, mx=None):
The block structure is the following for variables:
InstanceDump -> Key as PrimitiveArrayDump -> InstanceDump -> Value as PrimitiveArrayDump
or
Key as PrimitiveArrayDump -> InstanceDump -> Value as PrimitiveArrayDump
'''
def parse_type_one_references(self, heap_dump, mx, p, references):
Expand All @@ -224,8 +226,7 @@ def parse_type_one_references(self, heap_dump, mx, p, references):
self.references[el.id] = ObjectArrayReference(el.id, el.elements)
elif isinstance(el, PrimitiveArrayDump):
self.references[el.id] = PrimitiveArrayReference(el.id, el.element_type, p.type_size(el.element_type), el.size, el.data)
if (type(references[i-3])== InstanceDump and
type(references[i-2]) == PrimitiveArrayDump and
if (type(references[i-2]) == PrimitiveArrayDump and
type(references[i-1]) == InstanceDump):

key = self.references[references[i-2].id].ascii_data()
Expand Down

0 comments on commit 7789895

Please sign in to comment.