fix(libSceAjm.native): check sceAjmBatchJobRunSplit as firmware 13.42 does #15846

Merged
zaryabzip merged 3 commits from upstream-pr/15846 into main 2026-11-07 12:05:51 +00:00
zaryabzip commented 2026-11-04 19:04:52 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by zaryabzip on 2026-11-04T19:04:52Z.


What

sceAjmBatchJobRunSplit now checks its arguments, and whether the job fits, in the order firmware 13.42's libSceAjm.native.sprx does. That order comes from @BunnyFl's disassembly of the export (Z9NVCesiP0Q), posted on #15321 and left there for a follow-up. It was read from the module, not run on a console.

Order 13.42 refuses main
1 a null info, or sideband_output_size < 8: 0x80930005 no sideband check; a job with no sideband is built
2 a null input list with a nonzero count: 0x80930005 throws NotImplemented (CheckedAppend)
3 a null output list with a nonzero count: 0x80930005 throws NotImplemented
4 offset + (in + out) * 16 + 0x20 > size: 0x80930012, with info->offset moved to that end anyway 0x80930005 for a count over 255, 0x80930007 when the job doesn't fit

The job size is the host's own record: a 32-byte PackedJob plus 16 bytes per buffer, the same as the firmware's 0x20 + 16 * (in + out). 0x80930012 is ORBIS_AJM_ERROR_JOB_CREATION in shadPS4's ajm_error.h.

Still throws. These cases aren't refused by 13.42, but this implementation can't follow them:

  • More than 255 buffers on one side, in a job that fits. 13.42 has no 255 limit, but the host record packs each count in 8 bits.
  • A job size past 64 bits, which the firmware's arithmetic wraps. What follows is unread.

Unchanged. sceAjmBatchJobRun, DecodeSplit, GetGaplessDecode, GetInfo and GetCodecInfo used to call this export. They now call a helper with the old checks, because whether their 13.42 bodies share these checks is unread. That matters for GetCodecInfo, which passes the caller's result_size as the sideband size. The other builders keep 0x80930007 for a full batch. The null-list throw in that helper is a std::runtime_error, as elsewhere in Ajm.cpp, so tools/progress.py counts the five wrappers as implemented, as on main. libSceAjm.native's counts are unchanged.

Test. TestBatchJobRunSplitChecks covers:

  • each refusal, in order;
  • a wrapped count on either side, 300 inputs and 15 inputs, each in a fresh batch, refused for room with 0x80930012 and the offset moved to the job's end;
  • a job that fills the batch exactly, then the next job's 0x80930012 with the offset moved past the size, then sceAjmBatchJobClearContext's 0x80930007 on that batch.

Since review. @BunnyFl's review found that 13.42 stores the job's end into info->offset before comparing it with the size (0x26c2). So the refusal still advances the offset, which feed151116 now does. What later builders or sceAjmBatchStartBuffer do with an offset past the size is unread and left as it was: Append refuses with 0x80930007.

Three existing spots in GuestAjm.cpp pinned the old behaviour, and now follow the firmware:

  • two required a null list to throw; they now expect 0x80930005;
  • one built a run job with no sideband; it now passes an 8-byte result.

On main, the test builds and aborts at the first null-list call in guest_ajm, which main's CheckedAppend still throws for (AJM batch job with a null buffer list and a nonzero buffer count not implemented).

Overlap: five open PRs touch these files. git merge-tree merges this cleanly with #12613 and #14226 (mine), #15491 (BunnyFl) and #14078. #14212 conflicts with it, but #14212 already conflicts with main.

Tested

  • Windows, by @JJenkx (comment): Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. Head 632f88d054 merged onto main 0263899e99, a clean merge. guest_ajm passes in 3 of 3 runs. That is before feed151116.
  • Windows, by @BunnyFl, in the review: main + #15855 + 632f88d054. guest_ajm passes, and with Ajm.cpp from main it aborts.
  • Windows, by @BunnyFl, at feed151116 merged onto main b611e634f7 (review): guest_ajm passes. With Ajm.cpp from main it aborts (0xc0000409). With the offset store removed ((void)end;) it aborts as well, so the reworked rows catch a missing store.
  • WSL2 and Windows, by me at feed151116 on its base 9ab6a281ea (comment): Ubuntu 24.04.5, GCC 13.3.0, and Windows 11 Home 25H2, WinLibs GCC 15.2.0 r7, both Release. ctest -R "guest_ajm|atrac9|ngs2" passes all 56 tests on WSL2 and all 55 on Windows (guest_ajm_teardown is Linux-only), and --repeat until-fail:3 passes every round on both. With Ajm.cpp from main, guest_ajm aborts with "AJM batch job with a null buffer list and a nonzero buffer count not implemented" (0xC0000409 on Windows, SIGABRT on Linux).

Checked so far, on macOS (arm64, no full build possible there):

  • The changed lines of Ajm.cpp, and GuestAjm.cpp, pass an x86-64 clang++ -fsyntax-only.
  • tools/check_conventions.py --base main passes.
  • tools/progress.py --module libSceAjm.native gives the same done and todo counts as main (32 and 20).

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes (Claude Code)
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5159978827 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15846). Originally posted by [zaryabzip](https://github.com/zaryabzip) on 2026-11-04T19:04:52Z. --- ### What `sceAjmBatchJobRunSplit` now checks its arguments, and whether the job fits, in the order firmware 13.42's `libSceAjm.native.sprx` does. That order comes from @BunnyFl's [disassembly](https://github.com/boykopovar/AnyPS5/pull/15321#issuecomment-6607501296) of the export (`Z9NVCesiP0Q`), posted on #15321 and left there for a follow-up. It was read from the module, not run on a console. | Order | 13.42 refuses | `main` | |---|---|---| | 1 | a null `info`, or `sideband_output_size < 8`: `0x80930005` | no sideband check; a job with no sideband is built | | 2 | a null input list with a nonzero count: `0x80930005` | throws `NotImplemented` (`CheckedAppend`) | | 3 | a null output list with a nonzero count: `0x80930005` | throws `NotImplemented` | | 4 | `offset + (in + out) * 16 + 0x20 > size`: `0x80930012`, with `info->offset` moved to that end anyway | `0x80930005` for a count over 255, `0x80930007` when the job doesn't fit | The job size is the host's own record: a 32-byte `PackedJob` plus 16 bytes per buffer, the same as the firmware's `0x20 + 16 * (in + out)`. `0x80930012` is `ORBIS_AJM_ERROR_JOB_CREATION` in [shadPS4's `ajm_error.h`](https://github.com/shadps4-emu/shadPS4/blob/59b651be07/src/core/libraries/ajm/ajm_error.h#L23). **Still throws.** These cases aren't refused by 13.42, but this implementation can't follow them: - More than 255 buffers on one side, in a job that fits. 13.42 has no 255 limit, but the host record packs each count in 8 bits. - A job size past 64 bits, which the firmware's arithmetic wraps. What follows is unread. **Unchanged.** `sceAjmBatchJobRun`, `DecodeSplit`, `GetGaplessDecode`, `GetInfo` and `GetCodecInfo` used to call this export. They now call a helper with the old checks, because whether their 13.42 bodies share these checks is unread. That matters for `GetCodecInfo`, which passes the caller's `result_size` as the sideband size. The other builders keep `0x80930007` for a full batch. The null-list throw in that helper is a `std::runtime_error`, as elsewhere in `Ajm.cpp`, so `tools/progress.py` counts the five wrappers as implemented, as on `main`. libSceAjm.native's counts are unchanged. **Test.** `TestBatchJobRunSplitChecks` covers: - each refusal, in order; - a wrapped count on either side, 300 inputs and 15 inputs, each in a fresh batch, refused for room with `0x80930012` and the offset moved to the job's end; - a job that fills the batch exactly, then the next job's `0x80930012` with the offset moved past the size, then `sceAjmBatchJobClearContext`'s `0x80930007` on that batch. **Since review.** @BunnyFl's [review](https://github.com/boykopovar/AnyPS5/pull/15846#pullrequestreview-5774991391) found that 13.42 stores the job's end into `info->offset` before comparing it with the size (`0x26c2`). So the refusal still advances the offset, which `feed151116` now does. What later builders or `sceAjmBatchStartBuffer` do with an offset past the size is unread and left as it was: `Append` refuses with `0x80930007`. Three existing spots in `GuestAjm.cpp` pinned the old behaviour, and now follow the firmware: - two required a null list to throw; they now expect `0x80930005`; - one built a run job with no sideband; it now passes an 8-byte result. On `main`, the test builds and aborts at the first null-list call in `guest_ajm`, which `main`'s `CheckedAppend` still throws for (`AJM batch job with a null buffer list and a nonzero buffer count not implemented`). Overlap: five open PRs touch these files. `git merge-tree` merges this cleanly with #12613 and #14226 (mine), #15491 (BunnyFl) and #14078. #14212 conflicts with it, but #14212 already conflicts with `main`. ### Tested <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> - **Windows, by @JJenkx** ([comment](https://github.com/boykopovar/AnyPS5/pull/15846#issuecomment-6639987978)): Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. Head `632f88d054` merged onto `main` `0263899e99`, a clean merge. `guest_ajm` passes in 3 of 3 runs. That is before `feed151116`. - **Windows, by @BunnyFl**, in the review: `main` + #15855 + `632f88d054`. `guest_ajm` passes, and with `Ajm.cpp` from `main` it aborts. - **Windows, by @BunnyFl**, at `feed151116` merged onto `main` `b611e634f7` ([review](https://github.com/boykopovar/AnyPS5/pull/15846#pullrequestreview-5775484120)): `guest_ajm` passes. With `Ajm.cpp` from `main` it aborts (`0xc0000409`). With the offset store removed (`(void)end;`) it aborts as well, so the reworked rows catch a missing store. - **WSL2 and Windows, by me** at `feed151116` on its base `9ab6a281ea` ([comment](https://github.com/boykopovar/AnyPS5/pull/15846#issuecomment-6641768429)): Ubuntu 24.04.5, GCC 13.3.0, and Windows 11 Home 25H2, WinLibs GCC 15.2.0 r7, both Release. `ctest -R "guest_ajm|atrac9|ngs2"` passes all 56 tests on WSL2 and all 55 on Windows (`guest_ajm_teardown` is Linux-only), and `--repeat until-fail:3` passes every round on both. With `Ajm.cpp` from `main`, `guest_ajm` aborts with "AJM batch job with a null buffer list and a nonzero buffer count not implemented" (`0xC0000409` on Windows, SIGABRT on Linux). Checked so far, on macOS (arm64, no full build possible there): - The changed lines of `Ajm.cpp`, and `GuestAjm.cpp`, pass an x86-64 `clang++ -fsyntax-only`. - `tools/check_conventions.py --base main` passes. - `tools/progress.py --module libSceAjm.native` gives the same done and todo counts as `main` (32 and 20). ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: <!-- #PR, or none --> none - [x] Fixes: <!-- issue it closes as Fixes #N, or none --> none - [x] Unblocks: <!-- title ID and Game bring-up discussion, e.g. PPSA01325 #3232, or none --> none - [x] GPUs tested: <!-- for AGC, shader recompiler or VideoOut changes: vendor, model, driver and OS of each GPU the GPU tests ran on; otherwise n/a --> n/a - [x] AI-assisted: <!-- yes / no --> yes (Claude Code)
BunnyFl commented 2026-11-04 20:05:38 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-11-04T20:05:38Z.

Review: CHANGES_REQUESTED


@zaryabzip thanks for taking this on. The check order, the codes and the job size all match firmware 13.42. One thing differs, and it's partly my fault: my disassembly note on #15321 left out a store, which I've now corrected there.

Confirmed bug (P2): a job refused with 0x80930012 still advances info->offset on 13.42

libSceAjm.native.sprx (firmware 13.42, sha256 8eea270172e7ea177e69fa7865493b72131670f87afa91798d7d749ac183d5c0), sceAjmBatchJobRunSplit = Z9NVCesiP0Q at 0x2650, read to the return:

addr: 0x26a9
26a9: mov 0x8(%rdi),%r14              ; r14 = info->offset
26ad: lea (%r11,%r8,1),%rax ; 26b4: shl $0x4,%rax
26b8: lea 0x20(%rax,%r14,1),%r15      ; r15 = offset + 0x20 + (in + out) * 16
26bd: mov $0x80930012,%eax
26c2: mov %r15,0x8(%rdi)              ; info->offset = r15, before the size check
26c6: cmp 0x10(%rdi),%r15 ; 26ca: ja 0x27d1
27d1: pop %rbx ; 27d2: pop %r12 ; 27d4: pop %r14 ; 27d6: pop %r15 ; 27d8: ret

0x27d1 only restores the saved registers, so nothing puts the old offset back. I also ran the export under review-tools/emu_sprx.py (a Unicorn harness with imports stubbed, not measured on a console):

Call Result info->offset before → after
1 input + 1 output, batch size 0x20 0x80930012 0x0 → 0x40
1 + 1 at offset 0x40, size 0x60 0x80930012 0x40 → 0x80
2^32 + 1 inputs + 1 output, size 0x100 0x80930012 0x0 → 0x1000000040
null input list, count 1 0x80930005 0x0 → 0x0
sideband size 7 0x80930005 0x0 → 0x0
1 + 1, size 0x100 0 0x0 → 0x40

The 0x80930005 refusals return before the store and leave the offset as it was; only the size refusal moves it.

At this head, sceAjmBatchJobRunSplit returns SCE_AJM_ERROR_JOB_CREATION at core/libs/prx/libSceAjm.native/src/Ajm.cpp:2085 without touching info->offset. TestBatchJobRunSplitChecks pins that: Require(info.offset == 0) at core/libs/tests/GuestAjm.cpp:966 after the three jobCreation rows, and Require(info.offset == storage.size()) at core/libs/tests/GuestAjm.cpp:971 after the last one. On 13.42 those rows leave the offset past info->size.

Suggested fix: on the size refusal, store info->offset + sizeof(PackedJob) + buffers * sizeof(AjmBuffer) into info->offset before returning 0x80930012 (your 64-bit guard above it already keeps that sum from wrapping), and give each refused row its own AjmBatchInfo in the test with the advanced offset as the expected value. I haven't read what the console's later builders or sceAjmBatchStartBuffer do with an offset past size, so I'd leave that out of this PR and say so in the debt entry.

What I ran

Windows 11 Pro 10.0.26300, WinLibs GCC 15.2, Release. main 0263899e99 doesn't compile libSceAgcDriver at core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp:1623 on main (#15301 against #10472; fix in #15855). The tree here is main + #15855 + this PR (91877ff97f, both merges clean):

  • guest_ajm: 1 of 1 passes.
  • Negative control: the same tree with core/libs/prx/libSceAjm.native/src/Ajm.cpp from main aborts (0xc0000409), so the test reaches the change.
  • tools/pr_overlap.py --branch on this head: 6 open PRs share files; 4 were compared with no overlapping lines. The 2 it couldn't compare (they conflict with main) I compared by hand: #13486 changes sceAjmBatchJobRunBufferRa and a console-job helper in Ajm.cpp, not sceAjmBatchJobRunSplit or AppendRun; #14212 only adds blank lines between entries of docs/dev/debt/libSceAjm.native.md.

The rest checks out against 13.42:

  • Null batch or sideband under 8, then the null input list, then the null output list, each 0x80930005 (0x2662, 0x2685, 0x26a0).
  • The full-width size (in + out) * 16 + 0x20 against info->size at +0x10. The 0x20 is sizeof(PackedJob), asserted as 32 at core/libs/prx/libSceAjm.native/src/Ajm.cpp:236.
  • Each buffer counts 16 bytes, the size of AjmBuffer (pointer and size_t, core/libs/SceTypes.hpp:496).
  • No 255 limit in the firmware, which the debt entry records as a host limit.
<!-- greyfinch-sync:boykopovar/AnyPS5:review:5774991391 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15846#pullrequestreview-5774991391). Originally posted by [BunnyFl](https://github.com/BunnyFl) on 2026-11-04T20:05:38Z. **Review:** CHANGES_REQUESTED --- @zaryabzip thanks for taking this on. The check order, the codes and the job size all match firmware 13.42. One thing differs, and it's partly my fault: my disassembly note on #15321 left out a store, which I've now corrected there. ## Confirmed bug (P2): a job refused with `0x80930012` still advances `info->offset` on 13.42 `libSceAjm.native.sprx` (firmware 13.42, sha256 `8eea270172e7ea177e69fa7865493b72131670f87afa91798d7d749ac183d5c0`), `sceAjmBatchJobRunSplit` = `Z9NVCesiP0Q` at `0x2650`, read to the return: ``` addr: 0x26a9 26a9: mov 0x8(%rdi),%r14 ; r14 = info->offset 26ad: lea (%r11,%r8,1),%rax ; 26b4: shl $0x4,%rax 26b8: lea 0x20(%rax,%r14,1),%r15 ; r15 = offset + 0x20 + (in + out) * 16 26bd: mov $0x80930012,%eax 26c2: mov %r15,0x8(%rdi) ; info->offset = r15, before the size check 26c6: cmp 0x10(%rdi),%r15 ; 26ca: ja 0x27d1 27d1: pop %rbx ; 27d2: pop %r12 ; 27d4: pop %r14 ; 27d6: pop %r15 ; 27d8: ret ``` `0x27d1` only restores the saved registers, so nothing puts the old offset back. I also ran the export under `review-tools/emu_sprx.py` (a Unicorn harness with imports stubbed, not measured on a console): | Call | Result | `info->offset` before → after | |---|---|---| | 1 input + 1 output, batch size `0x20` | `0x80930012` | `0x0` → `0x40` | | 1 + 1 at offset `0x40`, size `0x60` | `0x80930012` | `0x40` → `0x80` | | `2^32 + 1` inputs + 1 output, size `0x100` | `0x80930012` | `0x0` → `0x1000000040` | | null input list, count 1 | `0x80930005` | `0x0` → `0x0` | | sideband size 7 | `0x80930005` | `0x0` → `0x0` | | 1 + 1, size `0x100` | `0` | `0x0` → `0x40` | The `0x80930005` refusals return before the store and leave the offset as it was; only the size refusal moves it. At this head, `sceAjmBatchJobRunSplit` returns `SCE_AJM_ERROR_JOB_CREATION` at `core/libs/prx/libSceAjm.native/src/Ajm.cpp:2085` without touching `info->offset`. `TestBatchJobRunSplitChecks` pins that: `Require(info.offset == 0)` at `core/libs/tests/GuestAjm.cpp:966` after the three `jobCreation` rows, and `Require(info.offset == storage.size())` at `core/libs/tests/GuestAjm.cpp:971` after the last one. On 13.42 those rows leave the offset past `info->size`. Suggested fix: on the size refusal, store `info->offset + sizeof(PackedJob) + buffers * sizeof(AjmBuffer)` into `info->offset` before returning `0x80930012` (your 64-bit guard above it already keeps that sum from wrapping), and give each refused row its own `AjmBatchInfo` in the test with the advanced offset as the expected value. I haven't read what the console's later builders or `sceAjmBatchStartBuffer` do with an offset past `size`, so I'd leave that out of this PR and say so in the debt entry. ## What I ran Windows 11 Pro 10.0.26300, WinLibs GCC 15.2, Release. `main` `0263899e99` doesn't compile `libSceAgcDriver` at `core/libs/prx/libSceAgcDriver/Graphics/src/DepthSurface.cpp:1623` on `main` (#15301 against #10472; fix in #15855). The tree here is `main` + #15855 + this PR (`91877ff97f`, both merges clean): - `guest_ajm`: 1 of 1 passes. - Negative control: the same tree with `core/libs/prx/libSceAjm.native/src/Ajm.cpp` from `main` aborts (`0xc0000409`), so the test reaches the change. - `tools/pr_overlap.py --branch` on this head: 6 open PRs share files; 4 were compared with no overlapping lines. The 2 it couldn't compare (they conflict with `main`) I compared by hand: #13486 changes `sceAjmBatchJobRunBufferRa` and a console-job helper in `Ajm.cpp`, not `sceAjmBatchJobRunSplit` or `AppendRun`; #14212 only adds blank lines between entries of `docs/dev/debt/libSceAjm.native.md`. The rest checks out against 13.42: - Null batch or sideband under 8, then the null input list, then the null output list, each `0x80930005` (`0x2662`, `0x2685`, `0x26a0`). - The full-width size `(in + out) * 16 + 0x20` against `info->size` at `+0x10`. The `0x20` is `sizeof(PackedJob)`, asserted as 32 at `core/libs/prx/libSceAjm.native/src/Ajm.cpp:236`. - Each buffer counts 16 bytes, the size of `AjmBuffer` (pointer and `size_t`, `core/libs/SceTypes.hpp:496`). - No 255 limit in the firmware, which the debt entry records as a host limit.
BunnyFl commented 2026-11-04 20:43:33 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by BunnyFl on 2026-11-04T20:43:33Z.

Review: APPROVED


@zaryabzip thanks, that's it. feed151116 matches 13.42: the size refusal now moves info->offset to offset + 0x20 + (in + out) * 16 (core/libs/prx/libSceAjm.native/src/Ajm.cpp:2085 and core/libs/prx/libSceAjm.native/src/Ajm.cpp:2087), and the 0x80930005 refusals still return before it, as at 0x26c2 in my previous review. The expected offsets in refusedFor are the ones the emulator run gave (0x1000000040 for 2^32 + 1 inputs plus one output, 0x20 past the end for the full batch).

What I ran

Windows 11 Pro 10.0.26300, WinLibs GCC 15.2, Release. This head merged cleanly onto main b611e634f7 (f3fb5a15a3):

  • guest_ajm: 1 of 1 passes.
  • Negative control: the same tree with core/libs/prx/libSceAjm.native/src/Ajm.cpp from main aborts (0xc0000409).
  • Mutation, on main 9f35c937da + #15855 + this head (6280498c59): with info->offset = end; replaced by (void)end; (one match), guest_ajm aborts (0xc0000409). The reworked rows catch a missing offset store.
  • tools/check_conventions.py --base upstream/main --head this head, with the PR's title and description: all checks pass.
  • Overlap: as in my previous review. #13486 and #14212 are the only PRs the tool couldn't compare, and neither touches these lines.

Not run: a console. The firmware reading and the emulator run (imports stubbed) are the evidence for the offset store.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:5775484120 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/15846#pullrequestreview-5775484120). Originally posted by [BunnyFl](https://github.com/BunnyFl) on 2026-11-04T20:43:33Z. **Review:** APPROVED --- @zaryabzip thanks, that's it. `feed151116` matches 13.42: the size refusal now moves `info->offset` to `offset + 0x20 + (in + out) * 16` (`core/libs/prx/libSceAjm.native/src/Ajm.cpp:2085` and `core/libs/prx/libSceAjm.native/src/Ajm.cpp:2087`), and the `0x80930005` refusals still return before it, as at `0x26c2` in my previous review. The expected offsets in `refusedFor` are the ones the emulator run gave (`0x1000000040` for `2^32 + 1` inputs plus one output, `0x20` past the end for the full batch). ## What I ran Windows 11 Pro 10.0.26300, WinLibs GCC 15.2, Release. This head merged cleanly onto `main` `b611e634f7` (`f3fb5a15a3`): - `guest_ajm`: 1 of 1 passes. - Negative control: the same tree with `core/libs/prx/libSceAjm.native/src/Ajm.cpp` from `main` aborts (`0xc0000409`). - Mutation, on `main` `9f35c937da` + #15855 + this head (`6280498c59`): with `info->offset = end;` replaced by `(void)end;` (one match), `guest_ajm` aborts (`0xc0000409`). The reworked rows catch a missing offset store. - `tools/check_conventions.py --base upstream/main --head` this head, with the PR's title and description: all checks pass. - Overlap: as in my previous review. #13486 and #14212 are the only PRs the tool couldn't compare, and neither touches these lines. Not run: a console. The firmware reading and the emulator run (imports stubbed) are the evidence for the offset store.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!15846
No description provided.