mirror of
https://github.com/angr/angr
synced 2026-08-17 12:23:11 -04:00
_fold_call_exprs folds a call whose return value is used exactly once into that use site and removes the original call statement. This is incorrect when the call may write via a pointer argument: when they have "extra_defs" operands, e.g. a call that fills a stack buffer. Folding moves the call and its side-effect write to the return-value use site, leaving every other read of the written-through vvar referencing a value that is now never written. |
||
|---|---|---|
| .. | ||
| ailment | ||
| analyses | ||
| angrdb | ||
| engines | ||
| exploration_techniques | ||
| factory | ||
| gui | ||
| knowledge_plugins | ||
| llm | ||
| manual | ||
| mcp | ||
| misc | ||
| perf | ||
| procedures | ||
| regression | ||
| serialization | ||
| sim | ||
| simos | ||
| state_plugins | ||
| storage | ||
| types | ||
| utils | ||
| __init__.py | ||
| common.py | ||
| README.md | ||
| test_calling_conventions.py | ||
| test_cli.py | ||
| test_fuzzer.py | ||
| test_load_shellcode.py | ||
Tests
Running tests
These tests require the binaries repository, clone it in the folder where angr was cloned.
git clone https://github.com/angr/binaries
nose2 or pytest may be used to run tests.
Each tool can be installed with pip:
pip install nose2
pip install pytest
To run the tests with nose2, from the root of the repository, run:
nose2 -s tests
Or if using pytest, simply run:
pytest
Writing new tests
New tests should be written using unittest, part of Python's standard library. For more information about unittest, see https://docs.python.org/3/library/unittest.html. While we prefer nose2 and pytest for running tests, avoid using nose2 or pytest features in tests themselves, to avoid dependency on a specific runner.