mirror of
https://github.com/angr/angr
synced 2026-08-17 12:23:11 -04:00
* knowledge_plugins, code_location: recompute hashes after unpickling Atom, Definition, and CodeLocation cache their hash in a `_hash` slot. The default pickling persists that slot, but the hash folds in per-process-salted hashes (e.g. of register-name strings), so a value pickled in one process is stale when unpickled in another -- equal objects then hash differently, which breaks sets/dicts (and assertCountEqual) rebuilt from a pickle. Add `__getstate__`/`__setstate__` that drop `_hash` from the pickled state and reset it to None on load, so it is recomputed lazily in-process. `__dict__` and all slots are otherwise preserved, and the existing default-format pickles still load. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Disable protected-member for hash checks --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_atoms.py | ||
| test_environment.py | ||
| test_heap_address.py | ||
| test_live_definitions.py | ||