angr.knowledge_plugins.rtdb.rtdb¶
- class angr.knowledge_plugins.rtdb.rtdb.RuntimeDbForkCondom¶
Bases:
objectA class that invokes RuntimeDb.reopen_lmdb() upon forking. This is necessary to ensure that lmdb does not raise ReaderFullError in forked child processes. The reopen_rtdb() method is not called on Windows because os.register_at_fork does not exist on Windows.
- reopen_rtdb()¶
- class angr.knowledge_plugins.rtdb.rtdb.RuntimeDb¶
Bases:
KnowledgeBasePluginExternal storage-backed database for angr knowledge base plugins.
- __init__(kb, lmdb_path=None)¶
- Parameters:
kb (KnowledgeBase)
lmdb_path (str | None)
- Return type:
None
- increase_lmdb_map_size()¶
Increase the LMDB map size.
Note that the old database handle may no longer be valid after a map size increase. rhelmot could reproduce the error “Database handle belongs to another environment.” in nix + CPython 3.13.13. Reopening all databases after increasing LMDB map size solves this issue.
- Return type:
- reopen_lmdb()¶
Reopen the existing LMDB environment and all open databases in self._dbs.
- reopen_lmdb_databases()¶
- cleanup()¶
Close the LMDB environment and remove the rtdb directory if this is the last user of it. This method may be invoked multiple times (e.g., once by the atexit hook and once more by __del__) and should not fail.