Skip to content

Ignore angr run-time database directories - #211

Open
zardus wants to merge 1 commit into
masterfrom
ignore-angr-rtdb
Open

Ignore angr run-time database directories#211
zardus wants to merge 1 commit into
masterfrom
ignore-angr-rtdb

Conversation

@zardus

@zardus zardus commented Aug 28, 2026

Copy link
Copy Markdown
Member

THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS

Problem

angr writes its run-time LMDB database beside the binary it loads unless RTDB_BASE points elsewhere, so analysing the fixtures here leaves a <fixture>_angr_rtdb directory next to each one. The directory is removed on a clean exit and survives anything else — a kill, an out-of-memory stop, an interrupted sweep. Nothing ignores it:

$ git status --porcelain tests/x86_64
?? tests/x86_64/fauxware_angr_rtdb/
$ git check-ignore -v tests/x86_64/fauxware_angr_rtdb
(no .gitignore pattern matches it)

They accumulate: one local checkout of this repository used for angr test runs holds 299 of them. Every one is a line of git status output that a fixture author has to read past, and a git add -A sweeps them into a commit.

Root cause

The two names angr can give that directory — <binary>_angr_rtdb and, when that one is taken, <binary>_angr_rtdb_<uuid> — are ignored in angr's own repository and nowhere else. angr/binaries has no .gitignore entry for either, and it is the repository the directories are actually created in, because it is where the binaries are.

Fix

Add the same two lines angr's .gitignore carries at lines 39-40 to this repository's .gitignore:

$ git check-ignore -v tests/x86_64/fauxware_angr_rtdb
.gitignore:10:*_angr_rtdb	tests/x86_64/fauxware_angr_rtdb
$ git status --porcelain tests/x86_64

It hides the directories rather than stopping angr from creating them; creating them is angr's intended default and is not changed here.

Testing

git ls-files | grep -i angr_rtdb returns nothing on master, so neither pattern can mask a tracked file. Both spellings were checked with git check-ignore -v against a directory angr had actually created, one matching .gitignore:10 and the other .gitignore:11. This repository has no suite and no pre-commit configuration, so there is nothing else to run.

Validation: #211 (comment)

session: sharpen

@zardus

zardus commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS

Validation record for head b10d0d34fcaf9423ad7adab9ddf108a869e14457 against baseline 3bfd1de09dd357deafbe29b4075aa55a9379ce50.

  • Pattern check: in a throwaway repository carrying the proposed .gitignore, git check-ignore -v tests/x86_64/fauxware_angr_rtdb/data.mdb reports .gitignore:10:*_angr_rtdb, and git check-ignore -v tests/x86_64/fauxware_angr_rtdb_4ef619b077ab4063a4e4dd29d9fcb138/data.mdb reports .gitignore:11:*_angr_rtdb_*. Both forms angr creates are covered.
  • No tracked file is newly ignored: git ls-files | grep -i angr_rtdb returns nothing on master, so the two lines cannot mask anything already committed.
  • Provenance of the patterns: angr's own .gitignore carries *_angr_rtdb and *_angr_rtdb_* at lines 39-40. These are the same two lines.
  • Observed motivation: a local checkout of this repository used for angr test runs held 289 untracked *_angr_rtdb*/ directories, none of them ignored.
  • The commit was built with git plumbing against origin/master and pushed without checking the branch out, so no working tree was disturbed.

Caveats: this repository has no test suite and no pre-commit configuration, so there is nothing else to run. It hides the directories rather than stopping angr from creating them; that behaviour is angr's intended default and is not changed here.

@zardus

zardus commented Aug 28, 2026

Copy link
Copy Markdown
Member Author

THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS

Opening angr's run-time database beside tests/x86_64/fauxware with RTDB_BASE unset, then killing the process, before and after this change.

Before — the directory the killed worker left behind is untracked and stays in git status:

angr/binaries at master
angr/binaries at baseline 3bfd1de, RTDB_BASE unset
$ python -c "import angr; p = angr.Project('tests/x86_64/fauxware', auto_load_libs=False); p.kb.rtdb.open_db('cfgnodes')"
rtdb directory: tests/x86_64/fauxware_angr_rtdb
$ git status --porcelain tests/x86_64
?? tests/x86_64/fauxware_angr_rtdb/
$ git check-ignore -v tests/x86_64/fauxware_angr_rtdb
(no .gitignore pattern matches it)
$ git status --porcelain tests/x86_64      # after the killed process is gone
?? tests/x86_64/fauxware_angr_rtdb/

After — the same directory is ignored, and git status is clean:

with this change
angr/binaries at head b10d0d3, RTDB_BASE unset
$ python -c "import angr; p = angr.Project('tests/x86_64/fauxware', auto_load_libs=False); p.kb.rtdb.open_db('cfgnodes')"
rtdb directory: tests/x86_64/fauxware_angr_rtdb
$ git status --porcelain tests/x86_64
$ git check-ignore -v tests/x86_64/fauxware_angr_rtdb
.gitignore:10:*_angr_rtdb	tests/x86_64/fauxware_angr_rtdb
$ git status --porcelain tests/x86_64      # after the killed process is gone

angr writes its run-time LMDB database beside the binary it loads unless
RTDB_BASE points elsewhere, so running an analysis over a fixture leaves a
<fixture>_angr_rtdb directory next to it. angr's own .gitignore already
ignores both spellings; mirror them here so they cannot be staged by
accident.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant