Skip to content

test(relinker): mark synthetic host module stack non-executable - #71

Draft
JJenkx wants to merge 2 commits into
mainfrom
validation/pr6106-host-stack-fixture
Draft

JJenkx wants to merge 2 commits into
mainfrom
validation/pr6106-host-stack-fixture

Conversation

@JJenkx

@JJenkx JJenkx commented Oct 15, 2026

Copy link
Copy Markdown
Owner

What

The new guest_module_dir host fixture in upstream #6106 is built as a synthetic ELF without PT_GNU_STACK. On this Linux host, the loader treats it as requesting an executable stack and refuses to load libOptional.prx, so the test fails before checking the intended dependency behavior. This follow-up appends a PT_GNU_STACK header with read/write flags and increments the ELF program-header count. It changes only the test fixture; production relinker code is unchanged.

This draft branch contains boykopovar#6106's current project-source commit, preserving Zinebyte's authorship, followed by my two-line fixture commit. Depends on: boykopovar#6106. The fixture commit should be taken after boykopovar#6106 or incorporated into it; the branch is not an independent implementation of its dependency change.

Tested

Linux x86-64, current main d92a8dad390af1807cc91622b924252141816a5a, Release relinker-only build. With boykopovar#6106 head 78b906fb67a8edff3969f60d26ced129f981139e alone, guest_module_dir fails deterministically because ctypes.CDLL reports libOptional.prx: cannot enable executable stack as shared object requires: Invalid argument. With only this fixture correction added, 172/172 CTests pass, including guest_module_dir (0.28 s). Conventions and whitespace checks pass.

I also composed the current boykopovar#6106 change with #5559 on the same main. Without this correction, 172/173 relinker tests pass and guest_module_dir fails with the same loader error; with it, 173/173 pass, including guest_deferred_dependencies. These are local relinker-only checks; a full project build and other hosts remain unverified.

Checklist

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants