revert: undo #1156's bundled libc lifecycle suppression #1515
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1515"
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 oneandonlydean on 2026-10-08T10:50:02Z.
What
Reverts #1156 (merge
2d6aff7a1). The revert applies cleanly to currentmain.Why
Since #1156, a title's bundled
sce_module/libc.prxstays loaded for its exports but its init/fini is suppressed. Titles still call that copy'smalloc, which returns NULL because its mspace is never set up (#1500). On Linux this breaks titles that bundle libc at launch:St9bad_alloc;Bisected over
0e173a463..b36718214:e82e03f11(#1156's parent) is good,2d6aff7a1is the first bad commit. With #1156 reverted locally, the first title passes its full run again and thebad_allocis gone.The double heap handshake from #693 comes back with this revert. Fixing that needs the bundled copy either initialised, or its allocator routed to ours, so it can be redone in a new PR together with a test that runs a title's bundled
malloc.Tested
73ac9ef7fwith this revert:ctest432/432; game runs as above.main4b2413fb5. CI on this PR.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-08T10:53:51Z.
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
main)core/relinker/relinker/src/guest/GuestModuleBuilder.cppL88-107Imported from boykopovar/AnyPS5. Originally posted by klosixgaming-arch on 2026-10-08T10:54:03Z.
Review: COMMENTED
This revert addresses a real regression introduced by #1156 where bundled libc copies fail to initialize properly, causing malloc failures. The bisect analysis in the PR description is thorough and convincing.
The changes are extensive but conceptually simple - removing the replacement module ownership tracking that was causing issues. Good testing documentation showing the specific games affected (Silksong segfaulting, bad_alloc errors).
One question: the PR mentions "The double heap handshake from #693 comes back with this revert" - is there a follow-up plan to address that separately, or should it be noted in TechnicalDebt.md?