Skip to content

test(relinker): pin invalid guest PT_TLS outside file image - #13776

Closed
rooklz wants to merge 1 commit into
boykopovar:mainfrom
rooklz:test/invalid-guest-tls-segment-outside-file
Closed

rooklz wants to merge 1 commit into
boykopovar:mainfrom
rooklz:test/invalid-guest-tls-segment-outside-file

Conversation

@rooklz

@rooklz rooklz commented Oct 31, 2026

Copy link
Copy Markdown
Contributor

What

Guest modules whose PT_TLS initialization image bytes lie beyond the end of the module file are refused when the relinker reads the module (ElfReader::ReadProgramHeaders emits PT_TLS initialization image is outside the file). The guest_none_relocations harness did not pin that refusal (distinct from PT_TLS initialization image is outside PT_LOAD memory, already covered by #13773). This adds one invalid-case entry that appends a PT_TLS phdr with p_offset=0x27f9 and p_vaddr=0x1100 (inside the first PT_LOAD) for both plain ELF and SCE-tagged fixtures.

Tested

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

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 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.

1 participant