Commit graph

15 commits

Author SHA1 Message Date
Matt Borgerson
6029bb193c pcode: Update riscv test language id 2026-05-21 14:57:35 -07:00
huyi51462
a7ca0201ba
fix(engines): use Ijk_FakeRet instead of Ijk_Ret in CALLLESS mode (#6365)
When CALLLESS option is enabled, the engine skips function calls by
converting Ijk_Call successors to simulate an immediate return. Previously
this was done by setting jumpkind to Ijk_Ret, which caused
CFGEmulated._update_function_transition_graph to treat it as a real
cross-function return, invoking _add_return_from instead of _add_fakeret_to.

As a result, em_ret.graph remained correct (since _graph_add_edge is
jumpkind-agnostic), but function.graph was broken: call blocks had no
predecessors or successors, making function.graph inconsistent with
em_ret.graph.

Fix by changing the jumpkind from Ijk_Ret to Ijk_FakeRet in both
heavy.py and engine.py. This matches the true semantic intent of
CALLLESS — "assume the function returns, continue after the call site"
— and causes _update_function_transition_graph to invoke _add_fakeret_to,
correctly building intra-function edges in function.graph.

Affected files:
  - angr/engines/vex/heavy/heavy.py
  - angr/engines/engine.py
2026-04-24 09:08:31 -07:00
Fish
78799acd95
CFGModel: Spilling CFG nodes to RtDb. (#6092)
* Preliminary implementation of a spilling CFG graph.

* Fix some test cases.

* Fix another test case.

* Fixes.

* Lint code.

* Implement InEdgeView and OutEdgeView.

* Implement InDegreeView and OutDegreeView.

* Fixes.

* Use (Node.addr, Node.size) as key.

* Fix test cases.

* More fixes.

* Fix CFGENode support.

* Fix the remaining issues.

* Get rid of SpillingCFGGraph.reverse().

* Some refactoring.

* Oops

* Fix perf issue.

* Fix set size change error during key iteration.

* Fix db_batch_size assignment. Fix some test cases.

* SpillingCFGNodeDict.__setstate__: Initialize self._all_keys.

* Getting rid of the nodes dictionary.

* Fix logic in cfg_emulated.py

* Multiple fixes.

* Type annotation fix.

* Fix missing edges after merging CFGNodes.

* Fix more logic.

* Add Soot CFGNodes to the CFG model.

* Lint and type check.

* Add USE_SPILLING_CFGNODE_DICT and CFGNode.dirty.

* Oops

* Lint code.

* No more pickling of CFGNodes.

* Fix no_ret being None.

* Lint code.

* Some refactor; Destroy the fallback mechanism.

* Fix node dirty bug after deserialization.
2026-02-24 09:40:02 -07:00
Kevin Phoenix
86ca60014a
Remove conditional imports for hard dependencies in tests (#6077)
* Remove conditional imports for hard dependencies in tests

* Improve lint
2026-01-30 14:55:19 -07:00
pre-commit-ci[bot]
563fb5f862
[pre-commit.ci] pre-commit autoupdate (#6025)
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/astral-sh/ruff-pre-commit: v0.14.11 → v0.14.13](https://github.com/astral-sh/ruff-pre-commit/compare/v0.14.11...v0.14.13)
- [github.com/psf/black-pre-commit-mirror: 25.12.0 → 26.1.0](https://github.com/psf/black-pre-commit-mirror/compare/25.12.0...26.1.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2026-01-19 13:37:06 -07:00
Christoph Jung
cc291cf169
pcode engine: zero extend in OpBehaviorIntRight (#5741)
* zero extend in OpBehaviorIntRight

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-10-22 10:35:53 -07:00
Kevin Phoenix
e55cefabdc
Make pypcode required (#5471)
* Make pypcode required

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* whoops

* Double whoops

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2025-05-19 09:38:17 -04:00
Kevin Phoenix
feda6f6909
Apply ruff SIM lints (#4793)
* Apply SIM lints

* Fix some failing tests

* Fix more bugs
2024-08-29 16:56:53 -07:00
Kevin Phoenix
ee464d0338
Adopt from __future__ import annotations (#4790) 2024-08-28 18:31:43 -07:00
Matt Borgerson
883f08fcd8 tests: Fixup shebangs, main functions, and mark tests executable 2023-09-07 18:46:00 -07:00
Matt Borgerson
0b5742d507 pcode: Update test_pcode.py ArchPcode generation 2023-01-25 18:43:07 -07:00
Matt Borgerson
454da0a608 pcode: Migrate ArchPcode generation to archinfo 2023-01-25 18:43:07 -07:00
zwimer
346b2d883d black 2023-01-12 16:43:51 -07:00
Zachary Wimer
415508a997
Skip tests if a dependency is missing rather than failing them (#3568)
* Skip tests if a dependency is missing rather than failing them

* Linter fixes

* Fix typo

* Revert do_trace but raise unittest.SkipTest instead of generic exception

Co-authored-by: Kevin Phoenix <kevin@kphoenix.us>
2022-10-14 16:11:21 -07:00
Matt Borgerson
4f5802ae09 pcode: Add a couple sanity check test cases 2022-03-29 22:53:50 -07:00