Skip to content

test(relinker): pin unaligned guest lifecycle array size rejection - #13714

Closed
rooklz wants to merge 1 commit into
boykopovar:mainfrom
rooklz:test/unaligned-guest-lifecycle-array
Closed

rooklz wants to merge 1 commit into
boykopovar:mainfrom
rooklz:test/unaligned-guest-lifecycle-array

Conversation

@rooklz

@rooklz rooklz commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

What

GuestImageReader::readLifecycleArray rejects a non-zero DT_INIT_ARRAY-style size tag that is not a multiple of eight (Unaligned guest lifecycle array size). The invalid-case harness already pinned incomplete arrays and per-slot relocation errors but not this size guard. One new invalid case sets tag 27 to 4 for both plain ELF and SCE-tagged fixtures.

Tested

macOS arm64, upstream/main 4b7af94e1d, Python 3.13, relinker-only Release -DANYPS5_RELINKER_ONLY=ON -DBUILD_TESTING=ON:

  • ctest -R guest_none_relocations: pass (new unaligned-lifecycle-size for sce=False/True).
  • Full ctest: 529/529.
  • python3 tools/check_conventions.py --base upstream/main: passed.
  • python3 tools/pr_overlap.py --branch test/unaligned-guest-lifecycle-array: no overlap with open PRs (merge-tree with test(relinker): pin invalid guest lifecycle function relocation #13711 disjoint hunks).

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

@rooklz
rooklz force-pushed the test/unaligned-guest-lifecycle-array branch from f93c848 to 61952f3 Compare October 31, 2026 02:30

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

The new invalid case reaches the existing unaligned-size guard for both plain ELF and SCE fixtures and asserts the error and absence of output artifacts.

What I ran

Reviewed head e6c4959ab5d262f5b9efb15ba7aa8457639dc098 against PR base 0cc02f7cde69941f651819b1f7a80f7aa722a08b. Current main is e2df06e661f94d6e63b8f6622c8c58507b0245c1; the exact-head merge preview was clean. Environment: Debian 12 x86-64, Python 3.11.2, GCC 12.2.0. No local build was run.

python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 13714
python3 -m py_compile core/relinker/relinker/tests/test_guest_none_relocations.py
git diff --check 0cc02f7cde69941f651819b1f7a80f7aa722a08b...e6c4959ab5d262f5b9efb15ba7aa8457639dc098
python3 tools/check_test_registration.py --scripts
python3 tools/pr_test_quality.py --root /marc/AnyPS5 --json core/relinker/relinker/tests/test_guest_none_relocations.py
python3 tools/pr_stack_check.py 13714 --repo boykopovar/AnyPS5
gh pr checks 13714 --repo boykopovar/AnyPS5

Results

Check Result
Diff, conventions, Python syntax Passed.
Test registration Passed; CMake registers guest_none_relocations.
Test-quality heuristic No findings from the workspace copy. The isolated precheck checkout lacked this workspace-only helper.
Current-main merge preview Clean against e2df06e661f94d6e63b8f6622c8c58507b0245c1.
Hosted CI Ubuntu relinker and relinker-asan passed. Windows and both macOS relinker jobs were pending at the last check. Linux, Windows product, register-context and write-watch jobs were skipped.
Selected unedited output from checks
All conventions checks passed.
230 test script(s), each run by an add_test or a workflow
relinker (ubuntu-latest, g++)	pass	4m20s	https://github.com/boykopovar/AnyPS5/actions/runs/41160877922/job/124418485551
relinker-asan	pass	2m39s	https://github.com/boykopovar/AnyPS5/actions/runs/41160877922/job/124418485497
relinker (windows-latest, g++)	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41160877922/job/124418485584
relinker (macos-latest, clang++)	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41160877922/job/124418485511
relinker (macos-latest, clang++, x86_64)	pending	0	https://github.com/boykopovar/AnyPS5/actions/runs/41160877922/job/124418485518
Target branch tip: `e2df06e661f94d6e63b8f6622c8c58507b0245c1`
All heads unchanged: **True**
- PR #13714: **clean** against current base; head `e6c4959ab5d262f5b9efb15ba7aa8457639dc098`; changed paths: none reported
/usr/bin/python3: can't open file '/tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-13714-e6c4959ab5d2/head-e6c4959ab5d2-f5aff478/tools/pr_test_quality.py': [Errno 2] No such file or directory

Negative control

Assertion Mutation Result
Reject a four-byte lifecycle-array size Removing the existing C++ size-alignment guard Not exercised; this requires a local C++ rebuild, which was not run.

Findings

Blocking

None.

Non-blocking

Windows and macOS relinker jobs were still pending. The Ubuntu relinker job passed; the local review did not reproduce hosted CI.

Sources

Not verified

No local build or test run, Windows/macOS relinker result, or console behavior was verified here. Linux product and specialized CI jobs were skipped.

@rooklz

rooklz commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

Consolidated into #14079, which adds all of these guest_none_relocations invalid cases in one change so the test file has a single open pull request. Closing this per-case pull request in favour of that one.

@rooklz rooklz closed this Oct 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants