Skip to content

fix(sysmodule): preserve kernel unwind information - #5547

Closed
JJenkx wants to merge 5 commits into
boykopovar:mainfrom
JJenkx:fix/sysmodule-unwind-forwarding
Closed

JJenkx wants to merge 5 commits into
boykopovar:mainfrom
JJenkx:fix/sysmodule-unwind-forwarding

Conversation

@JJenkx

@JJenkx JJenkx commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What

sceSysmoduleGetModuleInfoForUnwind duplicates a mapping-only query and always returns zero exception-table fields. A caller therefore loses unwind metadata that sceKernelGetModuleInfoForUnwind already finds for the same address. The wrapper also dereferences null output pointers and throws for an unmapped address instead of returning the kernel error.

Forward the query to the kernel implementation and link libSceSysmodule to libkernel. Remove the duplicate platform mapping code. The wrapper preserves the kernel's tables, segment information and errors, as the equivalent wrapper in shadPS4 does. Console equivalence remains unmeasured.

Tested

The new sysmodule/kernel comparison fails before the production change. After forwarding, the Linux main executable has matching nonzero EH-frame header, frame address and frame size. Existing executable, library, stack and anonymous mapping cases compare against the kernel result. Null output returns EFAULT; an unmapped Linux address returns ESRCH without changing a sentinel output field. Both normal and proc-mapping fallback sysmodule tests pass.

Full bundled Linux Release integration build passes using 32 build threads; five checks pass without skips: guest_sysmodule, guest_sysmodule_maps_scan, guest_module_info, guest_dynamic_loader and patched_libraries. Integration commit 7d09dbc, based on upstream 056d17e plus other development changes. Local topic and integration conventions pass.

The production change and regression match the tested integration. Subsequent full CI validates the independent topic on Linux and Windows, including the kernel/sysmodule parity and null-output checks. Native macOS library validation has not been done. Kernel platform limits remain, including metadata unavailable for some host images. No new guest exports, title progression or confirmed game exception recovery are claimed.

This review PR is in the JJenkx fork because the upstream author allowance is occupied by #4474. Its base is the existing fork main at 1acfa7f; the updated development integration is tested separately.

Full CI run 38326711983 passed at this exact topic head 4866f60. Linux: 936 passed and 43 skipped (979 total); Windows: 638 passed and 357 skipped (995 total). guest_sysmodule passed on both, and guest_sysmodule_maps_scan passed on Linux. All relinker platform, register-context and write-watch jobs passed. GitHub conventions passed.

Checklist

  • One topic per PR
  • No comments added to code
  • Generic unwind query forwarding
  • No game assets, binary excerpts, screenshots or investigation logs added
  • No new third-party code
  • Depends on: none
  • Unblocks: none
  • AI-assisted: yes

Current upstream validation

Published head b09a7536f5d6d468ca67570221a4ccb0dcaad137 contains current main d1670009fbfdfe57f8f26ee09ced77fe6b18c2ca and merges without conflicts. Conventions and whitespace checks pass. The topic's production change is unchanged by this main refresh. Previous validated build passes at 2301b938c3b36ee05ae8dae521dba557c1a363b0 against main 7a0c838ca48; any reused Linux results apply to their explicitly recorded earlier head/base. Latest-main full Linux and Windows validation passes for this published head; expected skips remain unvalidated.

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Closing: no title is known to reach this. With the queue at 700+ open PRs, please hold off on new PRs that don't name a title needing the change until it's down. If a title stops on this on current main, reopen with the title ID and the log line.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants