Add a PA-RISC shared library that exercises p-code conditional branch fall-through - #229
Add a PA-RISC shared library that exercises p-code conditional branch fall-through#229zardus wants to merge 1 commit into
Conversation
… fall-through angr's p-code to AIL converter takes a conditional branch's fall-through address from the BRANCH operation that follows it. The PA-RISC SLEIGH specification emits its nullification bookkeeping after most conditional branches instead, so usually no BRANCH follows and the fall-through is never supplied. 58 of this object's 61 conditional branches are in that shape; the other 3 are followed by a BRANCH and are converted correctly today. usr/lib/hppa-linux-gnu/rubygems-integration/3.3.0/extensions/hppa-linux-gnu/3.3.0/bindex-0.8.1/skiptrace/internal/cruby.so from ruby-bindex 0.8.1+ds-2+b2 for hppa, in Debian Ports: https://deb.debian.org/debian-ports/pool-hppa/main/r/ruby-bindex/ruby-bindex_0.8.1+ds-2+b2_hppa.deb The package is sha256 1c655476754809e14d198858e47ab2eae646acdc50acd1fc523314fae011f943 and the member is sha256 3973dc9042b57fe47b082d97441837e29483be7a0785f9f412e69543585d481e. ruby-bindex is Expat-licensed; its Debian copyright file names Expat for both the upstream sources and the packaging. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS Validation record for head Provenance, verified by fetching it
The package's What it isRead out of the committed blob: It is the second PA-RISC object in this repository. At the baseline Why the existing PA-RISC object could not be usedLoaded with What the new object supports
Converting each of the 114 blocks once produces 61 conditional jumps. On the Repository checksThe workspace gate ran on 2026-09-08 (08:57:52Z to 09:52:56Z) with this commit's That gate ran while this work sat on commit session: sharpen |
|
THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS What this fixture shows, before and after the angr change that consumes it Before -- on angr master, 58 of the object's 61 conditional jumps reach the angr masterEvery one of the 58 is missing the fall-through target; none is missing the true After -- with angr/angr#7124, none is missing either target: with angr/angr#7124The function, block and conditional-jump counts are identical in both arms; only the session: sharpen |
THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS
Problem
angr has one PA-RISC test input,
tests/hppa/test-instr_hppa, and nothing can beasserted about the decompiler on it:
CFGFastraisesKeyError: <Tmp 251392>fromangr/analyses/s_propagator.py:498before any function is structured, withdata_references=True, withnormalize=True, and with no options at all. Adecompiler fix for PA-RISC therefore has no fixture to regress against.
Root cause
That
KeyErroris a separate defect, already covered by open pull requests in angr.It is not something this repository can address; what this repository can do is carry
a second PA-RISC object small enough to reach structuring.
Fix
tests/hppa/ruby-bindex-cruby.so, 6,004 bytes:usr/lib/hppa-linux-gnu/rubygems-integration/3.3.0/extensions/hppa-linux-gnu/3.3.0/bindex-0.8.1/skiptrace/internal/cruby.sofrom
ruby-bindex0.8.1+ds-2+b2 for hppa in Debian Ports,https://deb.debian.org/debian-ports/pool-hppa/main/r/ruby-bindex/ruby-bindex_0.8.1+ds-2+b2_hppa.deb
(package sha256
1c655476754809e14d198858e47ab2eae646acdc50acd1fc523314fae011f943,member sha256
3973dc9042b57fe47b082d97441837e29483be7a0785f9f412e69543585d481e).ELF32 big-endian HPPA shared object, stripped.
ruby-bindexis Expat-licensed andits Debian copyright file names Expat for both the upstream sources and the
packaging.
Testing
Loaded with
main_opts={"backend": "elf", "arch": archinfo.ArchPcode("pa-risc:BE:32:default")}it yields 37 functions through
CFGFast, and converting every one of its blocks toAIL produces 61 conditional jumps -- 58 of which are missing their fall-through target
on angr master, and none of which are on the consumer branch.
The consumer is the angr change that needs this fixture; it links here.
Validation: #229 (comment)
session: sharpen