fix: Linux build and runtime fixes found while booting a retail UE title #7
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/7"
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 Pacuka on 2026-09-26T09:16:17Z.
While bringing up a retail Unreal Engine title (The Smurfs – Dreams) on Linux, I hit several build and runtime issues that are independent of the game-specific work. This PR contains only those fixes; larger library implementations will follow in separate PRs.
Build (Linux)
fix(build): configure bundled SDL2 without the global-staticlinker flag. On distributions without static X11 libraries (Arch/CachyOS), SDL2's X11 checks fail during configuration.fix(videoout): drop__stdcallfromDisplayWindow::windowProc. GCC rejects it on Linux, and it has no effect on x86-64 Windows.fix(build): link thecore/libstests without-staticon non-Windows hosts. They link against the prx shared libraries, which a fully static link rejects.Runtime
fix(libc): theSceLibcMallocReplacetable lists calloc before realloc. The heap called the application's calloc for realloc and the other way round, which silently corrupts memory. The heap test now uses the real table layout.fix(kernel):SCE_KERNEL_PROT_CPU_RWandCPU_EXECimply read access. GPU read/write bits map to host access because the emulated GPU accesses guest memory from the CPU. Previously these produced write-only host pages.fix(kernel): accept the AMPR/ACP device bits (0x40,0x80), e.g.0xC2.fix(libc): register the main image on Linux (PT_LOAD segments), so guestmprotecton the executable's own segments works as it already does on Windows.fix(agc):sceAgcCbReleaseMemaccepts the SDK's default GDS range (offset 0, size 1), which the inline wrapper passes for every release.Testing (Linux, GCC)
libsbuild succeed; the application heap tests pass.ctest: 22/28 pass. The 6 failures (guest_rendering_wait,guest_buffer_reuse,guest_shader_link,guest_system_exit_parameters,guest_memory,guest_search) abort the same way onmainwith only the build fixes applied, so they are pre-existing on Linux and not caused by this PR.🤖 Generated with Claude Code