Skip to content

fix(libc): fail a 0x with no hex digit and keep errno for in-range floats in sscanf_s - #12530

Merged
adriadam10 merged 3 commits into
boykopovar:mainfrom
JJenkx:windows/libc-scanf-s-hex-prefix
Nov 6, 2026
Merged

adriadam10 merged 3 commits into
boykopovar:mainfrom
JJenkx:windows/libc-scanf-s-hex-prefix

Conversation

@JJenkx

@JJenkx JJenkx commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Refreshed against main 0263899e996f26b165aed37f6b5a616dd1d4c6bb; current head af0443d37194a7000804f22c1e71c82cae572dbd retains previous public head 3eca2be06731a86e6dc6a7cf07259dc1378eb149 and main as ancestors. The conflict resolution preserves the topic behavior and current-main ordinary-scan/input-failure handling and fixtures.

The same five fixtures (guest_formatting, guest_scan_count, guest_wide_stream_scan, guest_wide_formatting, guest_crt) pass three times on main and on this head: 15 executions per arm, zero failures/skips. Public-header audit, conventions and whitespace checks pass. These are actual scoped libc/kernel/Ampr owners and selected fixtures with existing frozen ZArchive/zstd providers, not a whole-project build. No new Windows, title-unblock or performance claim.

Raw build/test/JUnit logs, commands, source patches, conflict resolutions and binary hashes, SHA-256 fd8ddb6a38a010916d71698df9cb60011e9800fe14db63baa9f4eca21e6b8e4f (download verified). The batch has 87 successful fixture executions in total; setup failures and corrected final qualification are retained in the archive.

Previous report and contribution template, with historical pins preserved:

Stacked on #12507. It builds on #12507's change to the same lines of ScanSource; review the second commit, 3eca2be067.

What

sscanf_s and vsscanf_s now handle two cases the way the libc.prx that titles ship does.

1. A 0x prefix with no hex digit after it. main handed these fields to the host scanner, which takes 0x as 0 and counts a successful conversion. The titles fail the conversion and store nothing:

field titles' result
%x, %X, %i or %p where the input or the width ends right after the x, with no sign ("0x", " 0X", "0x1" with %2x) input failure: EOF, or the count so far after an earlier conversion
the same with a non-hex character after the x ("0xg"), or with a sign ("-0x", "-0x1" with %3x) matching failure
floating (%a, %e, %f, %g) needs a hex digit, or . and a hex digit, within the width ("0x.8" is 0.5); anything else is a matching failure, never EOF

%d, %o and %u read the 0 and are unchanged. The check runs before the field reaches the host scanner.

2. errno for floating fields. UCRT sets ERANGE when %e of 1e40 overflows a float, and when %a of 0x1p200 does. The titles set it only when a decimal field overflows, or underflows to 0, as a long double, whatever the destination width; otherwise errno is left alone. This is the same rule #12514 measured for swscanf. Examples:

  • %Le of 1e5000 and %Lg of 1e-5000 set ERANGE;
  • %le of 1e400 and %La of 0x1p20000 don't.

errno is now decided from the scanned text with strtold.

Limits (new debt entry):

  • The stream forms (fscanf_s, scanf_s and their v forms) can only look one character ahead, so they keep the old behaviour.
  • On a host whose long double is double (macOS on ARM), a decimal field beyond double range sets ERANGE.

Tested

Windows 11 Enterprise 10.0.22621, Ryzen 9 5950X, WinLibs GCC 15.2.0 UCRT r7, Ninja, Release, BUILD_TESTING=ON, head 3eca2be067 (on #12507, base 6793a72475).

Integration and landing order — 2026-10-29

For my own PRs, the landing order is #12507 → #12530 → #12468. #12468 now retains StringSource::Remaining(), which #12530 uses twice. A private tree exactly matching the merge of #12468 accessor fix a84100962ceb61a1646c04aa62bdcc254c8cec01 and this PR at 3eca2be06731a86e6dc6a7cf07259dc1378eb149 builds and passes five focused Linux suites three times (15 checks). Removing the accessor produces the expected compile errors at those two calls; restoration passes all15 checks and restores identical libc bytes. The private combined source was not published.

The final #12468 head 068725777be07527eda51e086d8850500b7b8707 additionally integrates main157b and passes the same15 checks, with both formatting translation units passing MinGW cross syntax checks. This does not constitute new Windows runtime testing or external #11724 author agreement.

Raw qualification bundle, SHA-256 ca6b35926bcc6d3f21a9650517894c86b65594e2e2b653c5c32cd1c1de89c835.

AI-assisted: yes (Codex).

Independent reports on this head (their runs, summarised here):

  • @bunbeans2-arch (report): Windows 11 Pro, MSYS2 UCRT64 GCC 16.1.0, head 3eca2be067 merged into main fae9e483bb: guest_formatting passes 5/5; with Formatting.cpp from main it fails 5/5.

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: fix(libc): wrap narrow integers in sscanf_s as titles' libc.prx does #12507
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

…oats in sscanf_s

The libc.prx that titles ship (PPSA05916, PPSA07923) does not take a
0x prefix with no hex digit after it as 0. A %x, %X, %i or %p field
fails as an input failure when the input or width ends after the x
and no sign precedes it, and as a matching failure otherwise; a
floating field needs a hex digit, or a dot and a hex digit. Floating
fields set ERANGE only when a decimal field is out of long double
range, so %e of 1e40 and %a of 0x1p200 leave errno alone.

sscanf_s and vsscanf_s now check the prefix before handing the field
to the host scanner and decide errno from the scanned text. The
stream forms cannot look three characters ahead and are unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 9087 docs/dev/debt/libc.md L148

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5021 core/libs/tests/Formatting.cpp
docs/dev/debt/libc.md
PR 6819 docs/dev/debt/libc.md
PR 7081 docs/dev/debt/libc.md
PR 7386 core/libs/prx/libc/src/Formatting.cpp
core/libs/tests/Formatting.cpp
docs/dev/debt/libc.md
PR 7447 docs/dev/debt/libc.md
PR 7715 docs/dev/debt/libc.md
PR 8150 docs/dev/debt/libc.md
PR 8965 docs/dev/debt/libc.md
PR 9340 core/libs/prx/libc/src/Formatting.cpp
core/libs/tests/Formatting.cpp
docs/dev/debt/libc.md
PR 9371 docs/dev/debt/libc.md
PR 9447 docs/dev/debt/libc.md
PR 9526 docs/dev/debt/libc.md
PR 10780 docs/dev/debt/libc.md
PR 11172 docs/dev/debt/libc.md
PR 11332 core/libs/prx/libc/src/Formatting.cpp
core/libs/tests/Formatting.cpp
docs/dev/debt/libc.md
PR 11724 core/libs/prx/libc/src/Formatting.cpp
docs/dev/debt/libc.md
PR 11726 core/libs/prx/libc/src/Formatting.cpp
core/libs/tests/Formatting.cpp
docs/dev/debt/libc.md
PR 11831 docs/dev/debt/libc.md
PR 12518 docs/dev/debt/libc.md
PR 12682 docs/dev/debt/libc.md
PR 12688 docs/dev/debt/libc.md
PR 12700 docs/dev/debt/libc.md
PR 12704 docs/dev/debt/libc.md
PR 12849 docs/dev/debt/libc.md
PR 12965 docs/dev/debt/libc.md
PR 13449 docs/dev/debt/libc.md
PR 13486 core/libs/prx/libc/src/Formatting.cpp
core/libs/tests/Formatting.cpp
docs/dev/debt/libc.md
PR 13794 docs/dev/debt/libc.md
PR 13804 docs/dev/debt/libc.md
PR 13809 docs/dev/debt/libc.md
PR 14212 docs/dev/debt/libc.md
PR 15802 core/libs/prx/libc/src/Formatting.cpp
core/libs/tests/Formatting.cpp
docs/dev/debt/libc.md
PR 15803 core/libs/prx/libc/src/Formatting.cpp
core/libs/tests/Formatting.cpp
docs/dev/debt/libc.md
PR 15804 core/libs/prx/libc/src/Formatting.cpp
core/libs/tests/Formatting.cpp
docs/dev/debt/libc.md
PR 15807 core/libs/prx/libc/src/Formatting.cpp
core/libs/tests/Formatting.cpp
docs/dev/debt/libc.md

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed — looks good

The second stacked commit’s prefix checks and string-scan errno handling match the measured behavior described in the PR, and I found no blocking issue in that incremental diff.

What I ran

Reviewed commit 3eca2be06731a86e6dc6a7cf07259dc1378eb149 on parent PR #12507 head 0b3eb0b3e53a8faa1f01fd01a6de4061247ab308. The cumulative head merges cleanly onto current main f21ef7c99c5af648c5a41bddb18ce118b8e60c46. Environment: Debian 12 x86_64. I checked the incremental diff, merge tree, and whitespace; I did not build or execute the formatting tests locally.

git diff pr/12507...pr/12530 -- core/libs/prx/libc/src/Formatting.cpp core/libs/tests/Formatting.cpp docs/dev/debt/libc.md
git diff --check pr/12507...pr/12530
git merge-tree $(git merge-base upstream/main pr/12530) upstream/main pr/12530
gh pr checks 12530 -R boykopovar/AnyPS5

Results

Check Result
Incremental diff from #12507 Reviewed; limited to prefix parsing, floating range errno, tests, and debt documentation
Merge onto current main Clean
git diff --check Pass; no output
Conventions, eligibility, intake, labels Pass
Hosted Windows job Pass; selected-test, build, and CTest steps skipped
Linux Skipped
Focused differential and regression tests Author reports targeted comparisons matched both title libc builds and the regression set passed 3/3; not independently rerun by me
macOS jobs Pending when checked
Command output
$ git diff --check pr/12507...pr/12530
(no output)

$ git merge-tree $(git merge-base upstream/main pr/12530) upstream/main pr/12530 | head -3
merged
  result 100644 464536c25d2f7b531cd37b16a664125621c0933f core/libs/prx/libc/src/Formatting.cpp
  our    100644 ac280da5abaf8689e7817e9507167dfd17e18ad1 core/libs/prx/libc/src/Formatting.cpp

$ gh pr checks 12530 -R boykopovar/AnyPS5
conventions pass
eligibility pass
intake pass
labels pass
register-context (ubuntu-latest, Debug) pass
register-context (ubuntu-latest, Release) pass
relinker (ubuntu-latest, g++) pass
relinker (windows-latest, g++) pass
windows pass
relinker-asan pass
report pass
register-context (macos-15-intel, Debug) pending
register-context (macos-15-intel, Release) pending
relinker (macos-latest, clang++) pending
relinker (macos-latest, clang++, x86_64) pending
write-watch (macos-15) pending
write-watch (macos-15-intel) pending
linux skipping

Negative control

Assertion Change under test Did the new test fail?
Prefix failures and in-range floating conversions retain the measured behavior Not independently run by me; author reports guest_formatting fails with #12507’s prior implementation Author reports yes; not independently reproduced

Findings

Blocking

None found in the incremental change.

Non-blocking

The focused tests and title comparisons are author-reported. The hosted Windows job skipped CTest; Linux was skipped and macOS checks were pending when checked.

Sources

Not verified

I did not independently build/run the tests, use the title comparison loader, test on macOS or a console, or rerun the author’s random/targeted probes.

To get this to a good state

No follow-up is needed for this incremental review. If the commit changes, I will re-review its diff and rerun the merge and whitespace checks.

@adriadam10 adriadam10 self-assigned this Oct 28, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

@JJenkx the content of this PR looks right to me; one thing to sequence before it and #12468 can both land.

#12468 deletes StringSource::Remaining() (its wide branch was the last user: - const char* Remaining() const { return position; } in Formatting.cpp). This PR adds two new calls to it, in the 0x prefix check (CheckHexPrefix(source.Remaining(), width, floating)) and in the floating errno test (DecimalOutOfRange(std::string(source.Remaining(), ...))). git merge-tree merges the two cleanly because the edits are in different hunks, but the merged Formatting.cpp then has two calls and no definition, so the StringSource instantiation of ScanSource does not compile. Each PR's own CI is green, so nothing would flag it until the second one is rebased onto the first.

Whichever of #12468 and this PR lands second needs Remaining() kept or re-added. The simplest is to keep Remaining() in #12468 (it is a one-line accessor and this PR uses it), or to say here that you will re-add it when you rebase. This PR is also stacked on #12507, which needs to land first.

@JJenkx

JJenkx commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

A merge-order note from a local integration run. I merged this stack (#12507, this PR, #12532) with my #12428 and #12468 on main 319621ba2e, plus a local experiment that routes Windows vsscanf through ScanSource.

With both handled, the combined tree passes guest_formatting, guest_stdio_variadic, guest_scan_count, guest_wide_stream_scan, guest_wide_formatting, guest_wide_conversion, guest_strings, file_streams, guest_json, guest_safe_errors and the guest_standard_streams* tests 3/3 on Windows.

Against the libc.prx of PPSA07923 and PPSA05916, plain sscanf and sscanf_s then differ on:

  • 0 of 200,000 random numeric conversions;
  • 0 cases in every scanset, string and wide-field probe;
  • 2 of 100,000 random scansets. Those two have a format literal byte from 0x80 up after the set, which the titles fail to match.

AI-assisted: yes (Claude Code).

@JJenkx

JJenkx commented Oct 28, 2026

Copy link
Copy Markdown
Contributor Author

Linux run at this PR's exact head 3eca2be067 (3eca2be06731a86e6dc6a7cf07259dc1378eb149), not merged onto anything else; its base on main is 6793a72475.

Arch Linux, kernel 7.2.9, Ryzen 9 7950X, g++ (GCC) 16.2.1 20260810, glibc 2.44, x86-64. Release, BUILD_TESTING=ON, Ninja -j4, private worktree.

  • ctest -R '^guest_formatting$': passes in each of 3 runs (3 passes).

@JJenkx

JJenkx commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

For my own PRs, the landing order is #12507 → #12530 → #12468. #12468 now retains StringSource::Remaining(), which #12530 uses twice. A private tree exactly matching the merge of #12468 accessor fix a84100962ceb61a1646c04aa62bdcc254c8cec01 and this PR at 3eca2be06731a86e6dc6a7cf07259dc1378eb149 builds and passes five focused Linux suites three times (15 checks). Removing the accessor produces the expected compile errors at those two calls; restoration passes all15 checks and restores identical libc bytes. The private combined source was not published.

The final #12468 head 068725777be07527eda51e086d8850500b7b8707 additionally integrates main157b and passes the same15 checks, with both formatting translation units passing MinGW cross syntax checks. This does not constitute new Windows runtime testing or external #11724 author agreement.

Raw qualification bundle, SHA-256 ca6b35926bcc6d3f21a9650517894c86b65594e2e2b653c5c32cd1c1de89c835.

AI-assisted: yes (Codex).

cocoa55 added a commit to cocoa55/AnyPS5 that referenced this pull request Oct 29, 2026
boykopovar#12530 reads source.Remaining() in the contiguous branch of ScanSource,
so dropping the accessor here would break the build whichever of the
two lands second, without a textual conflict.

AI-assisted: yes
@bunbeans2-arch

Copy link
Copy Markdown
Contributor

A Windows run with GCC 16: Windows 11 Pro 10.0.22631, i9-9900K, MSYS2 UCRT64 GCC 16.1.0, Release, this PR (3eca2be067) merged into main fae9e48.

  • With this PR: guest_formatting passed 5 of 5.
  • Same tree with only Formatting.cpp put back to main (this PR's tests kept): it aborted with Formatting check failed in 5 of 5 runs.
  • main fae9e48 alone (its own tests and source): the same test passed 3 of 3.

AI-assisted: yes (Claude Code)

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 4, 2026
@JJenkx

JJenkx commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Windows check for the scheduled cross-platform review, at head af0443d371 merged onto main b611e634f7 (7b6ea8f986, clean merge).

Setup: Windows 11 Enterprise 22621, WinLibs GCC 15.2 UCRT, Release. The hosted Windows check does not run these tests on pull requests.

  • guest_formatting and guest_wide_formatting pass in 3 of 3 runs.

AI-assisted: yes.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 4, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head af0443d merged onto main b611e63 · tested 2026-11-05 02:34 UTC · 33 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 3,817 passed · 19 failed (0 new, 14 also fail on main, 5 unstable on main) · 61 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 3,897 of 3,946 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (1390 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_graphics 120.2 s, ⚠️ agc_driver_graphics_maps_fallback 120.1 s, ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ public_headers 66.7 s, ⚠️ agc_driver_bda_device 60.7 s
Unstable on main (5, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_array_layer_target_cpu: failed in 3 of the last 10 main runs
agc_driver_graphics: failed in 3 of the last 10 main runs
agc_driver_graphics_maps_fallback: failed in 2 of the last 10 main runs
agc_driver_pipeline_journal: failed in 9 of the last 10 main runs
agc_driver_two_sample_alpha_to_coverage_sample_mask_export: failed in 4 of the last 10 main runs
Failing on main too (14, not counted against this PR)
agc_driver_alpha_to_coverage_sample_mask_export
agc_driver_guest_memory_lifetime_direct
agc_driver_image_gather_volume
agc_driver_image_table
agc_driver_job_manager_compute_capacity
agc_driver_native_depth_bda_clear
agc_driver_native_depth_buffer_clear
agc_driver_native_depth_clears
agc_driver_native_multisample_depth
agc_driver_submit_progress
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Passed on retry (1, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)
agc_driver_two_sample_dithered_alpha_to_coverage: Timeout in the parallel run; also passed only on retry in 4 other runs in the last 7 days
Validation IDs already present on main (4 IDs in 807 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (807 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_draw_space_reuse, agc_driver_address_draw_space_reuse_held, agc_driver_address_draw_space_reuse_off, agc_driver_address_draw_space_reuse_transitions, agc_driver_address_draw_space_reuse_verify, agc_driver_address_passes, and 799 more
VUID-vkCmdCopyImage-srcImage-01548 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store_image_copy, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_partially_unmapped_plane, agc_driver_depth_plane_unmapped_plane, and 3 more
VUID-vkCmdCopyImage-srcImage-01551 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store_image_copy, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_partially_unmapped_plane, agc_driver_depth_plane_unmapped_plane, and 3 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
Skipped (61)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_copied_writer_label_order_drain: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
agc_driver_image_table_vouched_lookups: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a watched imported table cannot be vouched for
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_driver_unit_shadow_budget: skipped, the device does not import watched host memory for unit shadows
agc_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_idle_publish_wait: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a forced watch of the import reads its submissions as CPU stores
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_shadowed_key_stores: skipped, the device imports no watched host memory under a unit shadow
agc_small_tiled_shadow_label: skipped, host imports are unavailable: the test block is not imported and watched
agc_storage_clear_hand_over: skipped, the device imports no watched host memory for the clear-key hand-over
agc_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_output_mode: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_resolution_status: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_wqhd_detection: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
video_out_flip_aftergpu: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in 
Reproduce
git fetch origin af0443d37194a7000804f22c1e71c82cae572dbd b611e634f7fc024f0c13e342d96de744448ef1d9
git checkout b611e634f7fc024f0c13e342d96de744448ef1d9 && git merge --no-ff af0443d37194a7000804f22c1e71c82cae572dbd
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Nov 5, 2026
…hex-prefix

# Conflicts:
#	core/libs/prx/libc/src/Formatting.cpp
@JJenkx

JJenkx commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Refreshed onto main e772fb25cc (merge 2b8cca92ff). The conflict in core/libs/prx/libc/src/Formatting.cpp came from main's narrow-integer change to the neighbouring source.Scan(...) line. This PR's block next to it is kept unchanged, and every line the PR adds is present in the merge.

Windows, WinLibs GCC 15.2 UCRT, Release:

  • Formatting tests: guest_formatting and guest_wide_formatting pass in 3 of 3 runs, none skipped.
  • Negative control: with main's Formatting.cpp, one of the two fails ("Formatting check failed").
  • Conventions: tools/check_conventions.py passes.

AI-assisted: yes.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 5, 2026
@JJenkx

JJenkx commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Linux check of exact head 2b8cca92ff. Arch Linux 7.2.11, GCC 16.2.1, Release, BUILD_TESTING=ON.

guest_formatting and guest_wide_formatting pass in 3 of 3 runs each (ctest --repeat until-fail:3), none skipped. These are the tests the Windows refresh ran.

AI-assisted: yes

@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head 2b8cca9 merged onto main e772fb2 · tested 2026-11-05 16:12 UTC · 20 min

GPU AMD Radeon RX 6300 (RADV NAVI24), driver Mesa 25.2.8-0ubuntu0.24.04.4, Vulkan 1.4.318
Host Ubuntu 26.04.1 LTS, kernel 7.0.0-42-generic, container ubuntu:24.04
Logs build and test logs for this run
Build ✅ passed (Release, -DANYPS5_ENABLE_SPIRV_TOOLS=ON)
Tests ✅ 3,936 passed · 17 failed (0 new, 10 also fail on main, 7 unstable on main) · 71 skipped (ANYPS5_REQUIRE_VULKAN=1)
Test setup CPU-only tests without a GPU; GPU tests (and any CPU-only test that failed or skipped without one) once on the GPU with VK_LAYER_KHRONOS_validation and ANYPS5_NO_SHADER_CACHE=1; main ran the same way
Test selection 4,024 of 4,074 tests run: the ones this change can reach, chosen by tools/select_tests.py from main's build graph
Vulkan validation ✅ no new validation IDs vs main (1469 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.2 s, ⚠️ agc_driver_graphics_maps_fallback 116.5 s, ⚠️ agc_driver_graphics 116.0 s, ⚠️ agc_graphics_profile_draw 60.1 s, ⚠️ agc_driver_bda_device 58.7 s
Unstable on main (7, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_job_manager_compute_capacity: failed in 8 of the last 10 main runs
agc_driver_pipeline_journal: failed in 9 of the last 10 main runs
agc_driver_two_sample_alpha_to_coverage_sample_mask_export: failed in 5 of the last 10 main runs
agc_submit_progress: failed in 9 of the last 10 main runs
agc_submit_progress_no_timeline: failed in 9 of the last 10 main runs
guest_pthread_start: failed in 2 of the last 10 main runs
trace_digest_TraceDigestTests_test_cli_rejects_invalid_event_fields_without_partial_output: failed in 2 of the last 10 main runs
Failing on main too (10, not counted against this PR)
agc_driver_alpha_to_coverage_sample_mask_export
agc_driver_guest_memory_lifetime_direct
agc_driver_image_table
agc_driver_native_depth_bda_clear
agc_driver_native_depth_buffer_clear
agc_driver_native_depth_clears
agc_driver_native_multisample_depth
agc_driver_submit_progress
guest_mmap_executable
guest_socket_options_multicast
Passed on retry (1, failed in the parallel run, passed when re-run with a 360 s timeout; not counted against this PR)
agc_graphics_profile_draw: Timeout in the parallel run; also passed only on retry in 6 other runs in the last 7 days
Validated but not compared (67, not in the main baseline's validation pass)
guest_pthread_start
public_headers
public_headers_compile_0
public_headers_compile_1
public_headers_compile_10
public_headers_compile_11
public_headers_compile_12
public_headers_compile_13
public_headers_compile_14
public_headers_compile_15
public_headers_compile_16
public_headers_compile_17
public_headers_compile_18
public_headers_compile_19
public_headers_compile_2
public_headers_compile_21
public_headers_compile_22
public_headers_compile_23
public_headers_compile_24
public_headers_compile_25
public_headers_compile_26
public_headers_compile_27
public_headers_compile_28
public_headers_compile_29
public_headers_compile_3
public_headers_compile_30
public_headers_compile_31
public_headers_compile_32
public_headers_compile_33
public_headers_compile_34
public_headers_compile_35
public_headers_compile_36
public_headers_compile_37
public_headers_compile_38
public_headers_compile_39
public_headers_compile_4
public_headers_compile_40
public_headers_compile_41
public_headers_compile_42
public_headers_compile_43
public_headers_compile_44
public_headers_compile_45
public_headers_compile_46
public_headers_compile_47
public_headers_compile_48
public_headers_compile_49
public_headers_compile_5
public_headers_compile_50
public_headers_compile_51
public_headers_compile_52
public_headers_compile_53
public_headers_compile_54
public_headers_compile_55
public_headers_compile_56
public_headers_compile_57
public_headers_compile_58
public_headers_compile_59
public_headers_compile_6
public_headers_compile_60
public_headers_compile_61
public_headers_compile_62
public_headers_compile_63
public_headers_compile_7
public_headers_compile_8
public_headers_compile_9
trace_digest_TraceDigestTests_test_cli_rejects_invalid_event_fields_without_partial_output
trace_digest_TraceDigestTests_test_cli_rejects_invalid_summary_records_without_partial_output
Validation IDs already present on main (4 IDs in 808 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (808 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_draw_space_reuse, agc_driver_address_draw_space_reuse_held, agc_driver_address_draw_space_reuse_off, agc_driver_address_draw_space_reuse_transitions, agc_driver_address_draw_space_reuse_verify, agc_driver_address_passes, and 800 more
VUID-vkCmdCopyImage-srcImage-01548 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store_image_copy, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_partially_unmapped_plane, agc_driver_depth_plane_unmapped_plane, and 3 more
VUID-vkCmdCopyImage-srcImage-01551 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_cpu_write_after_memo, agc_driver_depth_plane_cpu_write_after_page_unwatch, agc_driver_depth_plane_cpu_write_after_partial_unwatch, agc_driver_depth_plane_partial_store_image_copy, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_plane_partially_unmapped_plane, agc_driver_depth_plane_unmapped_plane, and 3 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
Skipped (71)
agc_driver_bda_reads_shadowed_results: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_bda_reads_shadowed_results_per_build: skipped, the device reports watched host memory written when it imports or reads it
agc_driver_copied_writer_label_order: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_copied_writer_label_order_drain: skipped, the device reports a minStorageBufferOffsetAlignment of 4, so the dispatch binds its record at +0x1004 in place and nothing is written back; the test needs an alignment above 4
agc_driver_float16_unused_nan_payloads: skipped, the device has no native f16 conversions with RTE rounding and kept f16 denormals
agc_driver_gcn_display_present: skipped, no display: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
agc_driver_image_table_vouched_lookups: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a watched imported table cannot be vouched for
agc_driver_linear_target_direct_write_completion: skipped, the device does not keep host imports write-watched, so no completion stamp over the target is tracked
agc_driver_ngg_vertex_wave_reduction: skipped, s3 describes a 32-lane wave only on 32-lane subgroups, and the device has 64 lanes
agc_driver_recorded_draw_staging: skipped, the device does not keep host imports write-watched, so the target is never resident
agc_driver_scattered_runs: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_sparse_dma_buf_import: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_driver_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_driver_unit_shadow_budget: skipped, the device does not import watched host memory for unit shadows
agc_driver_vertex_elected_atomic_max: skipped, the device runs vertex programs in subgroups, so they keep their cross-lane reductions
agc_host_import_sparse: skipped, host imports are unavailable: /dev/udmabuf is not accessible
agc_idle_publish_wait: skipped, the device reports 4 of 4 host-imported pages written after a GPU read, so a forced watch of the import reads its submissions as CPU stores
agc_import_settle_initial_dcc: skipped, the device has no deferred settle of host imports: imports under 1 MiB wait for one only on Windows
agc_shadowed_key_stores: skipped, the device imports no watched host memory under a unit shadow
agc_small_tiled_shadow_label: skipped, host imports are unavailable: the test block is not imported and watched
agc_storage_clear_hand_over: skipped, the device imports no watched host memory for the clear-key hand-over
agc_storage_pending_key_refresh: skipped, refreshes over a pending key store are not testable here
agc_unit_shadow: skipped, the device does not import watched host memory for unit shadows
agc_unit_shadow_completion_store: skipped, the device reports watched host memory written when it imports or reads it
guest_http_uri_locale: 
guest_net_ctl: skipped, the host has no IPv4 address
guest_net_ctl_disconnected: skipped, the host has no IPv4 address
guest_video_out_color_space: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_device_capability: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_hdr: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_high_frame_rate: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROLLER) failed: wayland,x11 not available
guest_video_out_host_resolution_disabled: skipped, no display or Vulkan device: SDL_InitSubSystem(VIDEO | GAMECONTROL
Reproduce
git fetch origin 2b8cca92ff6985343850cb34846afc2f275701c9 e772fb25cc72ee5faf77847f06bbc69533016e82
git checkout e772fb25cc72ee5faf77847f06bbc69533016e82 && git merge --no-ff 2b8cca92ff6985343850cb34846afc2f275701c9
git submodule update --init --recursive
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTING=ON -DANYPS5_ENABLE_SPIRV_TOOLS=ON
cmake --build build && cmake --build build --target libs
VK_DRIVER_FILES=/nonexistent/icd.json ctest --test-dir build -E '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 12 --output-on-failure
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc|shader|recompiler|videoout|video_out|guest_video_out|vulkan)|gpu' --timeout 120 --parallel 16 --output-on-failure
# failures are then re-run alone: --timeout 360 --parallel 2; new validation IDs: the test alone, twice, --parallel 1

Automated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs.

@adriadam10
adriadam10 merged commit f0f52ca into boykopovar:main Nov 6, 2026
23 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Re-checked against current main 6185bdcfc: the Formatting.cpp changes that landed since the last review don't touch the 0x prefix check or the floating errno path, and #12468 (merged) kept StringSource::Remaining(), so both new calls compile; merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants