angr / angr/angr

TestUnicorn::test_similarity_fauxware non-determinism

Abierto
#5,796 3 comentarios 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
Python
Estrellas
9.1k
Forks
1.2k
Merge medio
16 h 20 min
PR fusionados (30 d)
169

Descripción

### Description

TestUnicorn.test_similarity_fauxware may randomly fail congruency check. Logic appears consistent, but constraints are slightly out of order causing failure in identity check.

e.g. https://github.com/angr/angr/actions/runs/19439235163/job/55618483241:

```

```

Full traceback

```
=================================== FAILURES ===================================
_____________________ TestUnicorn.test_similarity_fauxware _____________________
[gw0] linux -- Python 3.10.12 /__w/angr/angr/build/virtualenv/bin/python3

self =

def test_similarity_fauxware(self):
def cooldown(pg):
# gotta skip the initializers because of cpuid and RDTSC
pg.one_left.unicorn.countdown_nonunicorn_blocks = 39
return pg

> self._run_similarity(os.path.join("i386", "fauxware"), 1000, prehook=cooldown)

src/angr/tests/engines/test_unicorn.py:300:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
src/angr/tests/engines/test_unicorn.py:292: in _run_similarity
cc.run(depth=depth)
virtualenv/lib/python3.10/site-packages/angr/analyses/congruency_check.py:242: in run
if not self.compare_path_group(self.simgr) and self._validate_incongruency():
virtualenv/lib/python3.10/site-packages/angr/analyses/congruency_check.py:279: in compare_path_group
if not self.compare_paths(pl, pr):
virtualenv/lib/python3.10/site-packages/angr/analyses/congruency_check.py:362: in compare_paths
if not self.compare_states(pl, pr):
virtualenv/lib/python3.10/site-packages/angr/analyses/congruency_check.py:343: in compare_states
self._report_incongruency("Different memory or registers (index %d, values %r and %r)!", i, bn, bu)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self =
args = ('Different memory or registers (index %d, values %r and %r)!', 8, )

def _report_incongruency(self, *args):
l.warning(*args)
if self._throw:
> raise AngrIncongruencyError(*args)
E angr.errors.AngrIncongruencyError: ('Different memory or registers (index %d, values %r and %r)!', 8, , )
```

### Steps to reproduce the bug

Run test

### Environment

angr @ a8c22e66c923bf3c8a4fd27128e9f3c64efba3e6
claripy @ 0f02f57ef485d0b654afa220608f43a74bcafb7a

### Additional context

_No response_

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.