sceAjmInitialize: a retail title passes reserved = 0x300000000 and fails since #15906 #17659
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 muhmuhkuh on 2026-11-09T08:02:03Z.
What happens
sceAjmInitializereturnsINVALID_PARAMETER(0x80930005) forreserved=0x300000000since #15906, and the title that passes this value stops with a null write a few seconds after start.Title, test or build step
PPSA02015 (Death Stranding 2), content version 01.015.000 (
sce_sys/param.json).AnyPS5 commit
main0bae53facde8, which contains #15906 (merge6daf9a1cb6d, change7f477c4b3eb), plus local patches unrelated to Ajm.System
Windows 11 Pro 10.0.26200, NVIDIA GeForce RTX 3080 Ti (NVIDIA 610.88), MinGW-w64 GCC 15.2.0, Release.
Steps to reproduce
6daf9a1cb6d.0xC0000005.By reading
core/libs/prx/libSceAjm.native/src/Ajm.cpp: since #15906,sceAjmInitializereturns0x80930005for any nonzeroreserved, and the title's audio initialization calls it assceAjmInitialize(0x300000000, ctx)with a validctx(movabs $0x300000000,%rdiin the title's executable). Before #15906 the argument was ignored.Log
The process log has no line for the
sceAjmInitializereturn. The return value and the call come from reading the title's executable andAjm.cpp, not from the log. The lines around the stop (one line of the PRX list, then the crash block; paths shortened):What was checked
How the crash follows from the return value (read statically in the title's executable):
lock incl 0xb4(%r15)withr15= 0, in an allocator function that the caller (frame #0 below) calls on a global pointer that is still null.sceAudioOut2Initialize,sceSysmoduleLoadModule(0x10b), then the call above, thensceAcmContextCreate. With0x80930005fromsceAjmInitializeit returns failure, the pointer stays null, and the next allocation through it writes to address0xb4.Runs: two later runs with
libSceAjm.nativefrom before #15906 passed the point where the first run stopped (one of them was stopped by the run harness afterwards, the other kept running). Theirlibkernelbuilds differ from the crashing run's, so these two runs alone do not isolatelibSceAjm.native. A later build of the same source withAjm.cppreverted to its state before #15906 (the other changes are test fixes and profiling output in the graphics driver) has since started the title many times without this stop.Two other candidates were checked and ruled out:
sceKernelLoadStartModule(flags != 0oropt != nullptrreturnsEINVAL,5ee657294bf): the title's call sites (two forsceKernelLoadStartModule, one forsceKernelStopUnloadModule) passflags0 andopt0, and its guest modules do not import the call.libkernel'sDynamicLoader.cpp: it runs the module's start entry and constructors in the same order, in the calling thread, as the build before it, and the stopping pointer is set by the title's executable, not by module start. Judged unlikely from reading the code, not excluded by a run.What is measured
reserved0x809300050x300000000(lower 32 bits zero)Both points fit "only the lower 32 bits are checked", but that is a guess, and it could also be a bit mask or a range.
Proposal
sceAjmInitializeon a PS5 with a valid context pointer andreserved=0,1,0x100000000and0x300000000, recording the return value and whether the context is written.reserved. In either case, extend thesceAjmInitializeentry indocs/dev/debt/libSceAjm.native.mdwith the case "only the upper bits set: accepted by the console (a retail title relies on it), rule not measured".Related: #15906.
AI-assisted: yes