Relinker: ubiservices.prx conversion fails on 0F 78 while preparing The Rogue Prince of Persia (PPSA28155) #7547
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 THEMANnt on 2026-10-18T13:05:57Z.
Summary
The Rogue Prince of Persia cannot be prepared on unmodified main because instruction scanning stops in
Media/Plugins/ubiservices.prx:The same command failed at the same module and offset on both attempts, returning exit code 2. The game has not been launched.
Tested setup
9caecfd2d5a822be9daf84c69c7c33c7fafe52b9, no tracked source changes or extra patches.Reproduction
With the title's ELF modules in their original relative directories:
The executable and earlier modules are processed, then the conversion stops while scanning
ubiservices.prx.Relevant log excerpt:
Expected / actual
Expected: complete conversion of the title and its bundled modules so runtime testing can begin.
Actual: deterministic conversion failure before launch. The error originates from
core/relinker/codegen/src/x86/X64InstructionDecoder.cpp. Whether this is an unsupported instruction, instruction-boundary problem, or scanning non-code bytes has not yet been established. No title-specific workaround is proposed.Input identification for
ubiservices.prx:6b1869b26fc872ad244ab9e8514906619ccf2c6b2c9509a5fb880ec36d376e4aSearched existing issues and PRs for the exact error,
ubiservices, andPPSA28155; no matching report was returned. No game binaries or assets are attached.AI-assisted preparation/testing/report: yes.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T13:07:10Z.
I checked the scanner and decoder path. The current scanner treats the ELF executable section as a linear instruction stream and aborts on an unsupported opcode; it cannot distinguish function bytes from embedded data at that point. The report itself notes that the failing offset may be non-code or an instruction-boundary error, so changing opcode handling now could mask malformed code or incorrectly interpret data. Could you share the section/program-header mapping for file offset
0xf72b9band a short disassembly (including bytes before the reported offset), ideally from a second decoder such as Capstone/objdump? That would tell us whether this is a missing VMX instruction decode or a scan-boundary problem before anyone makes a general fix.Imported from boykopovar/AnyPS5. Originally posted by THEMANnt on 2026-10-18T15:51:03Z.
Thanks, @MarcZX10 — I checked this using GNU readelf/objdump 2.46.0.20260210 on the same module and main
9caecfd2d.Address and program-header mapping
There is an important correction: in this guest-module syscall-scan path,
GuestModuleBuilderpassesheader.MappedAddresstoScanCodeSectionForSyscalls. The reported0xf72b9bis a mapped/segment-relative address here, not the corresponding raw file offset.e_shoff=0x1cfd618,e_shnum=36,e_shentsize=64, but the file is only0x165e4e4bytes. Readelf reports that the section-header table extends past EOF, so I cannot reliably supply a section name. The earlier input checks covered program-segment ranges/alignment, not a valid section table.Bytes and independent disassembly
Raw file offsets, including bytes before the failure:
Objdump was run on an extracted range with
-D -b binary -m i386:x86-64 -M intel, adjusting its displayed address using PT_LOAD[0]. Its synthetic.datalabel is not an ELF section classification. The following is the forced instruction interpretation of those bytes, not evidence that this stream executes:More decisive: all 4096 bytes at raw file
[0xf76580, 0xf77580), mapped VA[0xf72580, 0xf73580), match the OpenSSL Whirlpool lookup table byte-for-byte with each eight-byte entry duplicated (N=2layout). The failure lies in zero-based entry 97, byte 11 of its duplicated 16-byte representation. The entry is0f 0f 3c 0f 78 33 1e 77, so the0f 78is inside a table constant.Treating the reported value literally as a raw file offset instead points to an unrelated valid AVX
vmovd; that is why the address distinction matters.Why I have not proposed an opcode or unwind-only fix
A separate diagnostic using the repository's existing EH-frame reader and decoder found 63,490 unwind-listed functions, decoding 3,998,282 instructions with zero function-decoding errors. The surrounding function ranges are
[0xf71c80,0xf72560)and[0xf735e0,0xf73665); the lookup table is in their gap.However, those functions contain direct branches to 749 distinct executable addresses outside all unwind-listed function ranges. Objdump at one, VA
0xf98120(file0xf9c120), shows a coherent routine ending inrepz ret. Thus the unwind list is useful evidence, but scanning only listed functions would also miss real unannotated code. The unchanged decoder still rejects bare0f 78 33as executable input.This strongly supports embedded data being linearly scanned as instructions, rather than a demonstrated need for VMREAD support. I have not changed the decoder, skipped bytes, established a complete code inventory, or produced a production fix/PR. The title remains blocked before launch. No game binaries or extracted binary slices are attached.
AI-assisted investigation/report: yes.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-18T16:07:17Z.
Thanks for tracing the mapped address back to the file and comparing the full page against the Whirlpool table. That establishes this specific
0F 78failure is data encountered by the linear scan, not evidence that the converter needs to acceptVMREAD. The direct branches outside unwind-listed functions also rule out using only unwind ranges as a safe scan boundary. I do not see a sound general fix from this report alone; we would need a code/data boundary source that covers unannotated executable routines before changing scanner behavior.Imported from boykopovar/AnyPS5. Originally posted by muteburrito on 2026-10-19T08:51:29Z.
I’d like to help investigate this issue. Is anyone currently working on a general fix? My proposed first step is a synthetic regression fixture for embedded data between executable routines, while preserving coverage of code outside unwind ranges. I’ve also noted related scanner PRs #6618 and #7651.
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-19T14:31:49Z.
The reported
0F 78at this offset was subsequently identified as embedded Whirlpool lookup-table data inubiservices.prx, not executable code. PR #7776, which treated bare0F 78as VMREAD, was closed after that analysis because decoding it broke code-extent and TLS test invariants: https://github.com/boykopovar/AnyPS5/pull/7776#issuecomment-6262444982. This means the original conversion failure is not evidence of a missing VMREAD decoder; the remaining question is why the scanner reaches that data range.Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-19T17:41:28Z.
I checked the current scanner paths and the related merged/open work. #6595 and #6618 handle relative jump tables associated with unwind function ranges, but the Whirlpool table in this report is ordinary constant data in a gap between code regions.
GuestModuleBuilderstill gives the full executablePT_LOADto the linearScanCodeSectionForSyscallspass, which is where this kind of byte stream can be decoded as instructions.A regression fixture for data embedded between executable routines would help. To prevent a fix from treating every gap between FDEs as data, it should also include a direct branch from an unwind-covered routine to real code outside unwind ranges, like the 749 external branch targets reported here. I do not yet see a sound general boundary rule from the current evidence; unwind ranges alone would miss that reachable code.