fix(relinker): reject incomplete RELA entries #1194
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1194"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by ASVLCII on 2026-10-07T17:11:04Z.
What
Reject
DT_RELASZandDT_OS_RELASZvalues that aren't multiples of the supported 24-byte RELA entry size. Linux conversion previously processed complete entries and silently discarded the trailing partial entry.The check lives in the shared pipeline. The new synthetic regression covers 32 combinations across both size-tag variants and Linux/Windows output, including valid sizes of 0, 24, and 48 bytes, partial entries, and
UINT64_MAX. Valid Linux outputs are checked for their relocation-table sizes.This is separate from #917's overflow-safe relocation bounds check and #1087's ELF header validation. No dependency on either patch.
Tested
Testing ran in a Debian 13 x86-64 cloud environment with GCC 14.2.0. Only synthetic fixtures and existing repository tests were used.
git diff --checkpassed.Broader testing across the initial run, serialized continuation, and isolated rechecks recorded 374 passes, 23 skips, and three failures:
agc_driver_emulated_color_compare: lavapipe returned 0.0 where 0.35 was expected.agc_driver_flat_store: OOM-killed at the cloud environment's 32 GiB memory limit, including when run alone.agc_driver_image_atomics64: unavailableVK_EXT_shader_image_atomic_int64extension.These failures were not reproduced on an unmodified upstream build, so they're not confirmed baseline failures. The full suite is not green. Skips included unavailable userfaultfd write tracking and larger subgroup widths.
AI-assisted: Codex investigated, implemented, and tested the patch in the cloud. The final diff was also reviewed before submission.
Checklist
main; no competing implementation of this size-alignment check found. #917 modifies the same pipeline for a different defect.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-08T08:49:17Z.
Checked: the new
rela_sizetest fails onmainand passes here; full ctest 427/427 and CI green on this head. The check mirrors the existingDT_PLTRELSZ % 24one. No conflict with #1446 (same file, different check); merging.