fix(libSceFiber): map fiber host stacks on hosts without MAP_STACK #5735
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5735"
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 mugurc on 2026-10-14T08:34:38Z.
What
AllocateHostStackin libSceFiber maps the fiber host stack withMAP_STACKsince #4265. The macOS SDK'ssys/mman.hdefinesMAP_NORESERVEbut notMAP_STACK, soExport.cppstops withuse of undeclared identifier 'MAP_STACK'on macOS, as @thuanquang found on #4628.The mapping flags are built in a local variable, and
MAP_STACKis added only where the host defines it. Linux keeps the same flags, and the function is compiled only outside_WIN32, so Windows does not change.Part of the macOS series announced on #1 (https://github.com/boykopovar/AnyPS5/issues/1#issuecomment-6124344298).
Tested
-arch x86_64 -std=c++20 -fexperimental-library,main107190d11(which has #4628) with this change:core/libs/prx/libSceFiber/Export.cppcompiles. Onmainwithout it the same command stops with theMAP_STACKerror.maindoes not link the guest tests yet.MAP_STACKis defined by glibc, so the flags are the same as before, and the function sits in the branch that_WIN32does not compile.python3 tools/check_conventions.py --base origin/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.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-15T12:09:02Z.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
core/libs/prx/libSceFiber/Export.cppImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-15T12:19:32Z.
Checked the diff:
MAP_STACKis now added only where the host defines it, so Linux keeps the same mmap flags and Windows is untouched (function is outside_WIN32). Built on main + this PR and libSceFiber ctest passes (1/1). macOS compile not reproducible here; relying on the macOS check in the description. Merging.