def sameBasicBlock(state1, state2):
    """
    Determine wheter two states are in a same basic block
    """
    if state1.addr == state2.addr:
        return True

    if state1.addr in state2.block().instruction_addrs or \
       state2.addr in state1.block().instruction_addrs:
        return True

    return False