Conversation
tests/avr/libgcov_avr31.a is usr/lib/gcc/avr/14.2.0/avr31/libgcov.a from Debian Ports' gcc-avr 1:14.2.0-2, hurd-i386 build: https://snapshot.debian.org/archive/debian-ports/20241102T074343Z/pool-hurd-i386/main/g/gcc-avr/gcc-avr_14.2.0-2_hurd-i386.deb sha256 63ffbb28b90916b17ceb446eea8fef3c5523c4f719c5642324fbc72762f27e0f, 31660 bytes. The .deb it came out of is sha256 d1a5db88c0fc04b518ec0c70e50d85644e357a957b33205e9b18e75f34796342. gcc-avr is a cross compiler, so the package architecture is hurd-i386 while the archive contents are AVR. The archive holds a symbol index, a long-name string table and 28 ELF32 little-endian AVR relocatables (EM_AVR, ET_REL, e_flags 0x9f, so EF_AVR_MACH 31 for the avr31 multilib with EF_AVR_LINKRELAX_PREPARED set), all built by GCC 14.2.0. On disk the members run from 620 bytes (0x26c) to 11,096 bytes (0x2b58): 21 of 620 bytes, four of 848, one of 844, one of 852, and the 11,096-byte libgcov driver object. It is here to give cle a real test of where archive members are placed in a 16-bit address space. AVR code addresses are 16 bits wide, and an archive with this many members does not fit if each one is given a generously rounded slot, so member placement is observable here on a real toolchain's output rather than on a synthesised archive. Take this file from Debian Ports, not Debian main. Main's amd64 build of the same version ships a copy that is also 31660 bytes but hashes to e9fd418d99dda7c0c34da108dc4fc143add544c5ba5d72128c93ec0597a8347b; the two differ in exactly 230 bytes, all of them in ar headers (buildd uid and gid, index mtime), and in no member body byte. libgcov is part of the GCC runtime. Upstream its sources are GPL-3.0-or-later WITH GCC-exception-3.1; the Debian package's own usr/share/doc/gcc-avr/copyright records the coarser GPL-3+. Redistribution is allowed either way. tests/avr/README.md records this, since LICENSE.md defaults the tree to MIT. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS What the tree holds before and after, and what the fixture is for. Absolute store paths in the traceback are trimmed to The gap -- no tracked archive targets an address space narrower than 32 bits: angr/binaries master fc07821With this change -- one 16-bit archive, from a real toolchain: this branchWhat it reproduces -- angr/cle master cannot load it: angr/cle master 0e77ade3With the sibling cle change -- all 28 members are placed into the cle placement fix applied |
|
THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS Validation record for head
Provenance, re-derived here rather than quoted from an earlier record:
Contents, parsed from the
Duplication: Licence: Caveat: the AVR archives were first noticed in a private corpus, but this fixture is a public Debian package and every provenance figure above is reproducible from it. session: sharpen |
THIS MESSAGE WAS GENERATED BY AN AUTOMATED PROCESS
Problem
cle tracks no static archive built for a target whose address space is narrower
than 32 bits, so its suite has no real compiler output to test member placement
in a very small space against. Reading
armagic over every tracked file, thenthe ELF header of the first object member:
That gap hides a real defect:
cle.Loadergives up on the AVR gcc runtime withCLEOperationError: Ran out of room in address spaceafter placing 27 of 28members, with
0xf90of0x10000bytes in use, and cle's suite cannot see it.Root cause
Of the three archives already tracked, one is 64-bit MIPS, one is 32-bit ARM,
and one opens with a BSD
__.SYMDEFrather than an ELF member. A 16-bit targetis the case where a 4 KiB page stops being small relative to the whole address
space, and nothing tracked reaches it. Synthesised inputs do exist in cle's own
suite, but no archive a real toolchain emitted.
Fix
tests/avr/libgcov_avr31.aisusr/lib/gcc/avr/14.2.0/avr31/libgcov.afromDebian Ports'
gcc-avr1:14.2.0-2, copied out byte for byte: 31,660 bytes,28 ELF32 little-endian AVR relocatables running 620 to 11,096 bytes on disk, for
a target whose entire address space is
0x10000.tests/avr/README.mdbeside itrecords the source, both digests, the member breakdown and the licence, since
LICENSE.mdotherwise defaults the tree to MIT and this is GCC runtime code.Take it from Debian Ports and not from Debian main. Main ships the same version
built for amd64, whose copy of this archive is also 31,660 bytes but hashes to
e9fd418d99dda7c0c34da108dc4fc143add544c5ba5d72128c93ec0597a8347b; the twodiffer in exactly 230 bytes, every one of them in an
arheader -- the buildd'suid and gid and the index mtime -- and in no member body byte.
gcc-avris across compiler, so the package architecture is
hurd-i386while everythinginside the archive is AVR. Nothing was rebuilt, patched or truncated.
Testing
The same scan run against this branch reports 4 archives among 1853 tracked
files, the new one reading
EM_AVR (16-bit), ELF32. The archive is thereproducer for angr/cle's placement fix: loading it with cle at master raises
CLEOperationError: Ran out of room in address space, and with that changeapplied all 28 members are placed into
0x23f0bytes. Both runs are in thecomment below.
git hash-objectof the file is8e77517696cd7f0936bb66339b2a10c7fb4e32d8,which matches no blob this repository already tracks, so it is not a second copy
of something filed under another name.
Validation: #228 (comment)
session: sharpen