summaryrefslogtreecommitdiffstats
path: root/tests/testfile_parameter_ref.c
diff options
context:
space:
mode:
authorAaron Merey <[email protected]>2025-08-10 20:26:35 -0400
committerAaron Merey <[email protected]>2025-08-20 10:26:25 -0400
commitcc459edfe10f2e76b82cccb8543c2f264f478209 (patch)
treeee797c318a8d942a8f42e55ebb32f22fa9b052e3 /tests/testfile_parameter_ref.c
parent36602dbd840532b9ca6d31c1612bf1d539241e7a (diff)
elf_getarhdr: Replace per-archive Elf_Arhdr storage with per-member storageupstream/users/amerey/try-arhdr
Currently each archive descriptor maintains a single Elf_Arhdr for the current archive member (as determined by elf_next or elf_rand) which is returned by elf_getarhdr. A single per-archive Elf_Arhdr is not ideal since elf_next and elf_rand can invalidate an archive member's reference to its own Elf_Arhdr. Avoid this possible invalidation by storing each Elf_Arhdr in its archive member descriptor. The existing Elf_Arhdr parsing and storage in the archive descriptor internal state is left mostly untouched. When an archive member is created with elf_begin it is given its own copy of its Elf_Arhdr from the archive descriptor. Also update tests/arextract.c with verification that each Elf_Arhdr is distinct and remains valid after calls to elf_next that would have previously invalidated the Elf_Arhdr. Signed-off-by: Aaron Merey <[email protected]>
Diffstat (limited to 'tests/testfile_parameter_ref.c')
0 files changed, 0 insertions, 0 deletions