Add r2sleigh native analysis integration - #25929
Draft
0verflowme wants to merge 1 commit into
Draft
Conversation
3 tasks
0verflowme
force-pushed
the
codex/r2sleigh-clean-pr
branch
5 times, most recently
from
May 12, 2026 08:33
2b3f0b7 to
665e91a
Compare
0verflowme
force-pushed
the
codex/r2sleigh-clean-pr
branch
from
July 2, 2026 06:57
665e91a to
3cfbe77
Compare
trufae
force-pushed
the
master
branch
2 times, most recently
from
July 20, 2026 17:05
b95a936 to
ad1ca1a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This replaces #25913 with a clean single-commit branch based on current
upstream/master. The old PR had accumulated noisy history from rebases and co-authorship churn, so this PR keeps the r2sleigh integration reviewable on its own.Why
../r2sleighneeds a native integration path into radare2 analysis data instead of relying on ad-hoc command output. This PR adds the minimal radare2-side seams needed for r2sleigh to consume typed function context, track assumptions, and apply analysis mutations while keeping the integration optional and preserving existing CLI/test behavior when the sleigh analysis plugin is not available.What Changes
aaa/aaaawithout hard-coding plugin behavior in command output.pdd/cmd.pdcdiscovery to the sleigh decompiler when theslaanalysis plugin is available, while keeping existing fallback behavior unchanged.r_anal_types_*helpers sotl,tl-, hint/global type links, and zero-address links correctly update dirty epochs and type context hashes.libr_corereferences to plugin-onlyanal_tpsymbols.aaalogs stable for r2pipe/r2r consumers by making the new post-analysis hooks silent.voidsignatures for API, pdc, and zignature consumers while keeping legacyafcftext output stable for var-only functions.Tests
make -j > /dev/nullmake -C test/unit bin/test_anal_function bin/test_anal_types LIBDIR='../../libr/core -L../../libr/main -L../../libr/config -L../../libr/debug -L../../libr/bin -L../../libr/lang -L../../libr/anal -L../../libr/bp -L../../libr/egg -L../../libr/asm -L../../libr/flag -L../../libr/search -L../../libr/syscall -L../../libr/fs -L../../libr/io -L../../libr/socket -L../../libr/cons -L../../libr/magic -L../../libr/muta -L../../libr/arch -L../../libr/esil -L../../libr/reg -L../../libr/util'DYLD_LIBRARY_PATH=... ./test/unit/bin/test_anal_functionDYLD_LIBRARY_PATH=... ./test/unit/bin/test_anal_typesR2R_RADARE2=/private/tmp/r2clean-r2 r2r -u test/db/cmd/r2pipe2(5 OK)R2R_RADARE2=/private/tmp/r2clean-r2 r2r -u test/db/cmd/cmd_af(18 OK / 2 BR)R2R_RADARE2=/private/tmp/r2clean-r2 r2r -u test/db/cmd/cmd_pdc(OK)R2R_RADARE2=/private/tmp/r2clean-r2 r2r -u test/db/cmd/cmd_zignature(OK)R2R_RADARE2=/private/tmp/r2clean-r2 r2r -u test/db/cmd/projects(37 OK / 5 BR)CI Notes
The latest fixes address the previously failing
linux-nocs,linux-acr-gperf,linux-tinyasan-fuzz, and TCC jobs by preserving plugin boundaries, command-log stability, and signature formatting compatibility.