angr.knowledge_plugins.rtdb.rtdb

class angr.knowledge_plugins.rtdb.rtdb.RuntimeDbForkCondom

Bases: object

A 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.

__init__(rtdb)
Parameters:

rtdb (RuntimeDb)

reopen_rtdb()
class angr.knowledge_plugins.rtdb.rtdb.RuntimeDb

Bases: KnowledgeBasePlugin

External storage-backed database for angr knowledge base plugins.

__init__(kb, lmdb_path=None)
Parameters:
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:

None

reopen_lmdb()

Reopen the existing LMDB environment and all open databases in self._dbs.

reopen_lmdb_databases()
open_db(db_name, unique=True)
Return type:

str

Parameters:
begin_txn(db_name, write=False)
Parameters:
drop_db(db_name)
Return type:

None

Parameters:

db_name (str)

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.