test(ajm): use a synthetic AT9 block that stays inside the gradient table #2163
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2163"
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 Zheorgyan on 2026-10-09T10:27:40Z.
What
guest_ajmfails on macOS, as mugurc reported on #1. the first mono block ofTestMultichannelAt9, header0x00filled with0x07, makes LibAtrac9 read a gradient end unit above 31, andCreateGradientthen writes pastBlock::Gradient[31]intoGradientModeand the fields after it. what the decoder reports as used for the 27-byte block depends on the compiler: 27 with GCC at-O1and above, 24 with GCC at-O0and with clang, 20 with the array widened to 48. on macOS the second frame is parsed from offset 24 and fails withERR_UNPACK_GRAD_START_UNIT_OOBfilled with
0xA5the block is still 27 bytes, decodes the same everywhere, stays in bounds and is audible. the overrun itself is inBlockin shadps4-emu/ext-LibAtrac9 and in the upstream library, only a malformed block reaches itTested
-O0to-O3and with Apple clang for arm64 and x86-64 at-O0and-O2. with0x07the four results above, with0xA527 bytes for each of the 4 frames everywhere.-fsanitize=bounds,addressreports theGradientoverrun for0x07and nothing for0xA5macos-portatc3affc1c.guest_ajmaborts before and passes afterguest_ajmpasses before and aftertools/check_conventions.pypassesChecklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-09T11:05:34Z.
Review: APPROVED
Reviewed the complete one-line fixture change and the reported sanitizer/platform runs. The replacement byte keeps this synthetic AT9 block within the decoder's gradient table and avoids exercising an out-of-bounds dependency path in this AJM test. The conventions check is green; I see no Build check on this PR, so this approval relies on the author's reported Linux/macOS runs.
Imported from boykopovar/AnyPS5. Originally posted by popcoder565 on 2026-10-09T15:46:56Z.
Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head
ed8bf0bd, merged ontomaind70b8998in one build with 38 other PRs that had no Windows run.guest_ajm. None of them reported skipping a case.No title was run.
🤖 Addressed by Claude Code
Imported from boykopovar/AnyPS5. Originally posted by Dextroid17 on 2026-10-09T15:57:36Z.
Review: COMMENTED
Linux negative control on the configuration where the failure actually appears (
-O0), since the approvals so far rest on the author's reported runs plus a Release Windows run.gcc 16.2.1, base
d70b8998; onlycore/libs/tests/GuestAjm.cppswapped between arms:On main at
-O0the abort is aRequire(false)atGuestAjm.cpp:597(DecodeAt9Superframe) — the same symptom the reporter of #2321 (test #331) saw: one frame decoded, 24 bytes of the 384 consumed. Release passes on both arms, so this is (as the body says) an-O0-only failure, which is why it is invisible to the Release CI.Could not verify: macOS/arm64, and the
Block::Gradientoverrun itself (it is in the vendored LibAtrac9 and is not reached by the corrected block).Written with AI assistance.