Add a CaRT-wrapped Mach-O executable - #190
Conversation
78732a8 to
ede0e1d
Compare
|
THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS Validation record for head
Caveat: this fixture is exercised only through its consumer. Until angr/cle#780 merges, nothing on |
|
THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS What this fixture moves, shown through its consumer. Before — the container test cannot run, because the file it loads does not exist: angr/binaries master (3bfd1de)After — the Mach-O with this change (ede0e1d)The other five cases in that file are the pre-existing PE and ELF containers, unchanged by this branch; they are shown to make clear the delta is the one new case. One note for anyone reproducing by hand rather than through the suite: every |
e8b6f82 to
f4e232d
Compare
tests/x86_64/fauxware.macho.cart is tests/x86_64/fauxware.macho wrapped in a CaRT container with the same ARC4 key the other .cart fixtures in that directory use. cle needs a Mach-O MH_EXECUTE inside a container backend to cover loading one as a container child.
f4e232d to
f3dd719
Compare
THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS
Problem
cleasserts that a Mach-OMH_EXECUTEis the loader's main binary. That is false for one loaded as a container child: the container registers itself as the main object while the child loads, so the child seesis_main_bin=Falseand trips the assertion before the loader can promote it. No fixture in the repository reaches that path —tests/x86_64/has CaRT-wrapped PE and ELF objects but no Mach-O.Root cause
Not a defect here — a gap. The two existing
.cartfixtures cover the backends whose assertions happen to tolerate being loaded as a child.Fix
tests/x86_64/fauxware.macho.cartis the existingtests/x86_64/fauxware.machowrapped in a CaRT container with the same ARC4 key as the two.cartfixtures already here. It unpacks byte for byte to that file, so it introduces no new binary content — only a new container around content the repository already ships.Testing
angr/binarieshas no test suite of its own, so the assertion is the consumer's. With binaries at master the consumer'stests/test_cart.py::test_cart_machofails on the missing file; with this branch the whole file passes, including the placement and entry assertions that match the direct load intest_macho.py. Both runs are in the comment below, with cle held at one head. Consumed by angr/cle#780Validation: #190 (comment)
session: sharpen