Skip to content

Error when extending IRSBs #187

Description

@seankramer

My program integrates C code and calls pyvex/angr through it. Within the C code I lift basic blocks to vex, and then combine basic blocks for indirect call/jump solving. When there are two preceding blocks to the same IRSB, pyvex gets a strange error when combining the second of the two blocks.

Although it says that the blocks have been combined (the program does not fail), attempting to pretty print the newly combined block will fail. Going statement by statement, pyvex only prints out the statement for the first instruction, but upon encountering the second statement 02 | t13 = GET:I64(rsp) , I get the following error:

enums.py:84: RuntimeWarning: tp_compare didn't return -1 or -2 for exception return ints_to_enums[i]

When manually getting the bytes of each block and combining them, it works without errors, but when calling the extend method the error will arise

EDIT: after adding PyErr_Print to the code: the error is:
File "pyvex/block.py", line 211, in extend
stmt_.tmp = convert_tmp(stmt_.tmp)
File "pyvex/block.py", line 193, in convert_tmp
tmp_type = extendwith.tyenv.lookup(tmp)
File "pyvex/block.py", line 578, in lookup
return self.types[tmp]
IndexError: list index out of range

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions