Skip to content

feat(libc): accept positional arguments with wide scanf fields on Linux - #11726

Open
cocoa55 wants to merge 10 commits into
boykopovar:mainfrom
cocoa55:feat/libc-sscanf-positional-wide
Open

cocoa55 wants to merge 10 commits into
boykopovar:mainfrom
cocoa55:feat/libc-sscanf-positional-wide

Conversation

@cocoa55

@cocoa55 cocoa55 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

What

On Linux, a scanf-family format that mixes %n$ positions with a 16-bit wide conversion (%ls, %lc, %l[, %S, %C) used to throw NotImplemented ("sscanf positional arguments with a 16-bit wide conversion on Linux"). Only wide formats hit this: narrow-only formats go straight to glibc, which already handles n$.

The in-process scanner (ScanSource) now reads positions itself:

  • NumberedScanArguments makes one pass over the format and returns the highest n$ position, or 0 when no conversion is numbered. ScanSource reads that many pointers up front, since a va_list can only be read forwards.
  • Each conversion reads its own n$ with the existing LibcDetail::ArgumentPosition (the printf side uses the same helper), then takes the nth pointer.
  • A format that mixes numbered and unnumbered assignments throws (scanf positional arguments mixed with unnumbered assignments). POSIX leaves that case undefined, so it is rejected rather than given a meaning. %% and assignment-suppressed %* conversions may still appear next to numbered ones, as POSIX allows.
  • RequireNoPositionalWideScan and ScansWideInProcess are removed. The callers now test HasGuestWideScan directly.
  • The _s forms still throw for positional arguments (scanf_s positional arguments), because their size arguments are interleaved with the pointers.

The debt entry is updated. FreeBSD's vfscanf has no $ support (it fails to match at the $), so what the console does here is unverified.

This builds on the fscanf PR (#11724), so until that one merges this PR also shows its commit. Only the last commit belongs to this PR.

Overlap: #9340 and #9087 also edit the wide-field block in ScanSource. Inside that block, this PR changes only the line that fetches the destination pointer (pointerAt(position)). #9340 also edits the scanf entry in docs/dev/debt/libc.md, and #10927 edits the lines around it, but the positional text here is a separate entry. #9340 also changes the wide-scan rejection tests in core/libs/tests/Formatting.cpp next to the %2$ls case removed here, and the #include lines of ScanWideField.cpp. All of these are textual conflicts only, and I'll rebase whichever PR merges second.

Tested

Run by Claude (AI) on Linux (Ubuntu, GCC 13.3), Release build with -DBUILD_TESTING=ON. ryanc2112 also ran it on Arch Linux (GCC 16.2.1), negative control included (see the comments):

  • guest_formatting_tests: new sscanf/vsscanf cases for reversed positions, a numbered narrow %3$d alongside wide fields, a suppressed %*ls with a numbered %1$n, a short input, mixed numbered/unnumbered formats (%d %1$ls, %1$ls %n) throwing, and vsscanf_s with n$ throwing. The old "%2$ls throws" case is removed.
  • guest_wide_stream_scan_tests: fscanf with %3$d %1$ls %2$lc.
  • Negative control: with the src changes reverted, guest_formatting_tests aborts with the old "not implemented" error.
  • guest_scan_count, guest_wide_formatting, guest_stdio_variadic pass.
  • Windows not built. The change there only affects sscanf_s/vsscanf_s formats that contain n$, which now throw. Before, the scanner passed the $ to the host as if it were a conversion.

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: feat(libc): read 16-bit wide fields in fscanf on Linux #11724
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

fscanf, vfscanf, scanf, vscanf and the _s stream forms threw on %ls,
%lc, %l[, %S and %C on Linux. Route those formats through the guest
scanner sscanf already uses, reading the stream through StreamSource.

The wide field reader now works on any source through Peek and Skip
instead of a contiguous buffer: it decides whether to take a character
from its lead byte, then consumes the whole UTF-8 sequence, so a
rejected character stays in the stream without multi-byte pushback.

AI-assisted: yes
Deciding from the lead byte only holds while scanset members are ASCII.
Each source now decodes its next character with PeekWide without
consuming it, and the field reader skips its bytes only once it takes
the character. StreamSource peeks by reading the UTF-8 sequence and
pushing it back with ungetc, as the fwscanf stream reader in
ScanningWide.cpp already does. Keep TSource::Contiguous.

AI-assisted: yes
@cocoa55
cocoa55 force-pushed the feat/libc-sscanf-positional-wide branch from cf361f9 to 8abc394 Compare October 27, 2026 06:00
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

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 3965 docs/dev/debt/libc.md
PR 5021 core/libs/tests/Formatting.cpp
docs/dev/debt/libc.md
PR 5303 docs/dev/debt/libc.md
PR 6819 docs/dev/debt/libc.md
PR 7447 docs/dev/debt/libc.md
PR 7544 docs/dev/debt/libc.md
PR 7715 docs/dev/debt/libc.md
PR 7851 docs/dev/debt/libc.md
PR 8150 docs/dev/debt/libc.md
PR 8417 docs/dev/debt/libc.md
PR 8965 docs/dev/debt/libc.md
PR 9371 docs/dev/debt/libc.md
PR 9447 docs/dev/debt/libc.md
PR 9466 docs/dev/debt/libc.md
PR 9526 docs/dev/debt/libc.md
PR 9677 docs/dev/debt/libc.md
PR 10002 docs/dev/debt/libc.md
PR 10007 docs/dev/debt/libc.md
PR 10113 docs/dev/debt/libc.md
PR 10226 docs/dev/debt/libc.md
PR 10253 docs/dev/debt/libc.md
PR 10274 docs/dev/debt/libc.md
PR 10321 docs/dev/debt/libc.md
PR 10397 docs/dev/debt/libc.md
PR 10506 docs/dev/debt/libc.md
PR 10510 docs/dev/debt/libc.md
PR 10512 docs/dev/debt/libc.md
PR 10569 docs/dev/debt/libc.md
PR 10780 docs/dev/debt/libc.md
PR 10987 docs/dev/debt/libc.md
PR 11109 docs/dev/debt/libc.md
PR 11172 docs/dev/debt/libc.md
PR 11262 docs/dev/debt/libc.md
PR 11266 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 11625 docs/dev/debt/libc.md
PR 11634 docs/dev/debt/libc.md
PR 11661 docs/dev/debt/libc.md
PR 11664 docs/dev/debt/libc.md
PR 11689 docs/dev/debt/libc.md
PR 11698 docs/dev/debt/libc.md
PR 11831 docs/dev/debt/libc.md
PR 11848 docs/dev/debt/libc.md
PR 11870 docs/dev/debt/libc.md
PR 11895 docs/dev/debt/libc.md
PR 12053 docs/dev/debt/libc.md
PR 12057 docs/dev/debt/libc.md
PR 12184 docs/dev/debt/libc.md
PR 12514 docs/dev/debt/libc.md
PR 12518 docs/dev/debt/libc.md
PR 12558 core/libs/prx/libc/src/Formatting.cpp
core/libs/tests/Formatting.cpp
PR 12574 docs/dev/debt/libc.md
PR 12592 docs/dev/debt/libc.md
PR 12593 docs/dev/debt/libc.md
PR 12594 docs/dev/debt/libc.md
PR 12598 docs/dev/debt/libc.md
PR 12605 docs/dev/debt/libc.md
PR 12622 core/libs/prx/libc/src/Formatting.cpp
core/libs/tests/Formatting.cpp
docs/dev/debt/libc.md
PR 12627 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 12920 docs/dev/debt/libc.md
PR 12947 docs/dev/debt/libc.md
PR 12965 docs/dev/debt/libc.md
PR 13390 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 13828 docs/dev/debt/libc.md
PR 14212 docs/dev/debt/libc.md
PR 14298 docs/dev/debt/libc.md
PR 14588 docs/dev/debt/libc.md
PR 14595 docs/dev/debt/libc.md
PR 14610 docs/dev/debt/libc.md
PR 14915 docs/dev/debt/libc.md
PR 15095 docs/dev/debt/libc.md
PR 15199 docs/dev/debt/libc.md
PR 15206 docs/dev/debt/libc.md
PR 15236 docs/dev/debt/libc.md
PR 15336 docs/dev/debt/libc.md
PR 15471 docs/dev/debt/libc.md
PR 15484 docs/dev/debt/libc.md
PR 15486 docs/dev/debt/libc.md
PR 15490 docs/dev/debt/libc.md
PR 15501 docs/dev/debt/libc.md
PR 15519 docs/dev/debt/libc.md
PR 15535 docs/dev/debt/libc.md
PR 15552 docs/dev/debt/libc.md
PR 15561 docs/dev/debt/libc.md
PR 15602 docs/dev/debt/libc.md
PR 15614 docs/dev/debt/libc.md
PR 15667 docs/dev/debt/libc.md
PR 15683 docs/dev/debt/libc.md
PR 15713 docs/dev/debt/libc.md
PR 15714 docs/dev/debt/libc.md
PR 15768 docs/dev/debt/libc.md
PR 15773 docs/dev/debt/libc.md
PR 15778 docs/dev/debt/libc.md
PR 15791 docs/dev/debt/libc.md
PR 15796 docs/dev/debt/libc.md
PR 15800 docs/dev/debt/libc.md
PR 15801 core/libs/prx/libc/src/Formatting.cpp
core/libs/tests/Formatting.cpp
core/libs/tests/GuestWideStreamScan.cpp
docs/dev/debt/libc.md
PR 15802 core/libs/prx/libc/src/Formatting.cpp
core/libs/tests/Formatting.cpp
core/libs/tests/GuestWideStreamScan.cpp
docs/dev/debt/libc.md
PR 15803 core/libs/prx/libc/src/Formatting.cpp
core/libs/tests/Formatting.cpp
core/libs/tests/GuestWideStreamScan.cpp
docs/dev/debt/libc.md
PR 15804 core/libs/prx/libc/src/Formatting.cpp
core/libs/tests/Formatting.cpp
core/libs/tests/GuestWideStreamScan.cpp
docs/dev/debt/libc.md
PR 15807 core/libs/prx/libc/src/Formatting.cpp
core/libs/tests/Formatting.cpp
core/libs/tests/GuestWideStreamScan.cpp
docs/dev/debt/libc.md
PR 15809 docs/dev/debt/libc.md
PR 15834 docs/dev/debt/libc.md
PR 15879 docs/dev/debt/libc.md
PR 15973 docs/dev/debt/libc.md
PR 16004 docs/dev/debt/libc.md
PR 16017 docs/dev/debt/libc.md
PR 16083 docs/dev/debt/libc.md
PR 16084 docs/dev/debt/libc.md
PR 16107 docs/dev/debt/libc.md
PR 16170 docs/dev/debt/libc.md
PR 16178 docs/dev/debt/libc.md
PR 16210 docs/dev/debt/libc.md
PR 16214 docs/dev/debt/libc.md
PR 16216 docs/dev/debt/libc.md
PR 16280 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.

One point in the argument-position description needs tightening. The code and PR text define what happens when a format mixes numbered assignments (%n$) with unnumbered assignments, and say that this matches glibc. POSIX says those forms cannot be mixed in one format (except %% and assignment-suppressed %* conversions); otherwise the result is undefined: https://pubs.opengroup.org/onlinepubs/000095399/functions/fscanf.html. The added tests use numbered assignments throughout (the unnumbered %*ls case is suppressed), so they do not establish the mixed behavior claimed in the description. Please describe mixed assignment formats as unverified/unsupported, or add a test and document the chosen extension without attributing it to glibc. This is not a correctness blocker for formats that use numbered arguments consistently.

@cocoa55
cocoa55 force-pushed the feat/libc-sscanf-positional-wide branch 2 times, most recently from b80b1a9 to d838ff6 Compare October 27, 2026 06:32
@cocoa55

cocoa55 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor Author

One point in the argument-position description needs tightening. The code and PR text define what happens when a format mixes numbered assignments (%n$) with unnumbered assignments, and say that this matches glibc. POSIX says those forms cannot be mixed in one format (except %% and assignment-suppressed %* conversions); otherwise the result is undefined: https://pubs.opengroup.org/onlinepubs/000095399/functions/fscanf.html. The added tests use numbered assignments throughout (the unnumbered %*ls case is suppressed), so they do not establish the mixed behavior claimed in the description. Please describe mixed assignment formats as unverified/unsupported, or add a test and document the chosen extension without attributing it to glibc. This is not a correctness blocker for formats that use numbered arguments consistently.

Thanks, good catch. I went with the stricter option: a format that mixes numbered and unnumbered assignments now throws NotImplemented instead of getting a made-up meaning, and the description no longer attributes anything to glibc. %% and %* conversions can still sit next to numbered ones, as POSIX allows. I added tests for %d %1$ls and %1$ls %n throwing, and updated the debt entry and the PR description to match.

@MarcZX10

Copy link
Copy Markdown
Contributor

The latest update addresses my earlier POSIX concern: mixed numbered and unnumbered assignments now throw, the description is explicit about the exception for %% and suppressed conversions, and tests cover both mixed-assignment orders. The current hosted conventions, eligibility, labels, Ubuntu register-context, ASan relinker, Ubuntu relinker, and macOS x86_64 relinker checks pass; remaining macOS/Windows relinker jobs are pending, while product Linux/Windows jobs are skipped. I also inspected the positional parsing and stream scanner changes in the diff; I could not run the project tests locally in this environment.

One merge-order detail remains upstream in the dependency chain: #11724 now depends on #9087, #9340, and #10927. I found explicit agreement from #9087's author, but no confirmation from #9340's author yet. Since this PR depends on #11724, please make sure that order is agreed with all overlapping PR authors before merging.

@ryanc2112

Copy link
Copy Markdown
Contributor

Linux run of head d838ff641 (includes #11724), merged onto main c547deaacb (clean merge, local only): SteamOS 3.8 (kernel 6.18.50-valve2), Arch distrobox, GCC 16.2.1, CMake 4.4.4, Ninja, Release, BUILD_TESTING=ON, Ryzen 5 2600.

  • guest_formatting, guest_wide_stream_scan, guest_scan_count, guest_wide_formatting, guest_stdio_variadic, guest_daemon: 6/6 pass, 3 of 3 runs, on the merge and on plain main.
  • Negative control: with core/libs/prx/libc/src and include reverted to main and the PR's tests kept, guest_formatting aborts with sscanf positional arguments with a 16-bit wide conversion on Linux not implemented and guest_wide_stream_scan with fscanf 16-bit wide conversion on Linux not implemented, so the new cases exercise the change.

This adds a second Linux toolchain (GCC 16 on Arch) to the Ubuntu GCC 13 run in the description.

AI-assisted: yes (Claude Code)

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
sscanf, vsscanf and the fscanf family threw when a format mixed n$
positions with a 16-bit wide conversion. The in-process scanner now
reads the n$ prefix and takes the nth pointer. Formats that mix
numbered and unnumbered assignments, which POSIX leaves undefined, and
positional arguments in the _s forms still throw.

AI-assisted: yes
…-fields

# Conflicts:
#	docs/dev/debt/libc.md
…oa55/anyps5 into feat/libc-sscanf-positional-wide

# Conflicts:
#	core/libs/prx/libc/src/Formatting.cpp
#	docs/dev/debt/libc.md
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 30, 2026
@ryanc2112

Copy link
Copy Markdown
Contributor

Re-ran on the rebased head db350d63c, merged locally onto main c70974fefb (clean merge). Linux, Arch distrobox on SteamOS, Ryzen 5 2600, GCC 16.2.1, 3 runs each:

tree guest_formatting, guest_wide_stream_scan, guest_scan_count, guest_wide_formatting, guest_stdio_variadic, guest_daemon
main 6/6 passed, 3/3 runs
this PR merged onto main 6/6 passed, 3/3 runs
main libc + only this PR's two test files 0/2 passed, 3/3 runs

The control fails with the messages this PR removes:

  • guest_wide_stream_scan: fscanf 16-bit wide conversion on Linux not implemented
  • guest_formatting: sscanf positional arguments with a 16-bit wide conversion on Linux not implemented

AI-assisted: yes (Claude Code)

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

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head e016aac merged onto main 291e02d · tested 2026-11-01 13:44 UTC · 12 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,042 passed · 14 failed (0 new, 13 also fail on main, 1 unstable on main) · 57 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,113 of 3,155 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 (1226 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.5 s, ⚠️ agc_driver_graphics_maps_fallback 101.7 s, ⚠️ agc_driver_graphics 100.8 s, ⚠️ agc_driver_bda_device 50.2 s, ⚠️ public_headers 39.5 s
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 3 of the last 4 main runs
Failing on main too (13, not counted against this PR)
agc_driver_guest_memory_lifetime_direct
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_idle_publish_wait
agc_submit_progress
agc_submit_progress_no_timeline
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (5 IDs in 711 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (711 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, and 703 more
VUID-vkCmdCopyImage-srcImage-01548 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, 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, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_storage_dispatch, and 3 more
VUID-vkCmdCopyImage-srcImage-01551 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, 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, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_storage_dispatch, and 3 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
VUID-VkShaderModuleCreateInfo-pCode-08737 (1 test): agc_driver_image_sample_derivatives
Skipped (57)
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_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_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_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 SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not 
Reproduce
git fetch origin e016aac1e6adc68a3b6c59a36b94956c024db711 291e02d4877784d03d346962af51713b9df63b91
git checkout 291e02d4877784d03d346962af51713b9df63b91 && git merge --no-ff e016aac1e6adc68a3b6c59a36b94956c024db711
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 removed the needs rebase Conflicts with main, rebase needed label Nov 1, 2026
@TechLevelZero

Copy link
Copy Markdown
Contributor

✅ AMD GPU test: passed

PR head 889dc39 merged onto main f2d874c · tested 2026-11-01 18:57 UTC · 15 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,055 passed · 13 failed (0 new, 9 also fail on main, 4 unstable on main) · 58 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,126 of 3,168 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 (1232 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 99.3 s, ⚠️ agc_driver_graphics 95.1 s, ⚠️ public_headers 57.6 s, ⚠️ agc_driver_bda_device 45.8 s
Unstable on main (4, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_pipeline_journal: failed in 3 of the last 5 main runs
agc_driver_submit_progress: failed in 3 of the last 5 main runs
agc_submit_progress: failed in 4 of the last 5 main runs
agc_submit_progress_no_timeline: failed in 4 of the last 5 main runs
Failing on main too (9, not counted against this PR)
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_idle_publish_wait
guest_mmap_executable
guest_socket_options_multicast
Validation IDs already present on main (5 IDs in 711 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (711 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_array_layer_target, and 703 more
VUID-vkCmdCopyImage-srcImage-01548 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, 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, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_storage_dispatch, and 3 more
VUID-vkCmdCopyImage-srcImage-01551 (11 tests): agc_driver_depth_clear_hle, agc_driver_depth_plane_buffer_memory, 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, agc_driver_depth_plane_partial_store_unimported, agc_driver_depth_storage_dispatch, and 3 more
VUID-VkPipelineColorBlendStateCreateInfo-pAttachments-00605 (2 tests): agc_driver_prepared_exports, agc_driver_srgb8_color_target
VUID-VkShaderModuleCreateInfo-pCode-08737 (1 test): agc_driver_image_sample_derivatives
Skipped (58)
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_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_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_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_pipeline_binary_vulkan: skipped, the device lacks VK_KHR_pipeline_binary
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 SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_backtoback: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_controls: skipped, no display or Vulkan device: DisplayWindow: Vulkan support is either not configured in SDL or not available in current SDL video driver (offscreen) or platform
video_out_flip_cpuflip: skipp
Reproduce
git fetch origin 889dc39861f0d8b15b3f5f4fabeeea251f8469e2 f2d874c1fdccf781c0fa5d86619bb5dd8894b958
git checkout f2d874c1fdccf781c0fa5d86619bb5dd8894b958 && git merge --no-ff 889dc39861f0d8b15b3f5f4fabeeea251f8469e2
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.

…/libc-sscanf-positional-wide

# Conflicts:
#	core/libs/prx/libc/include/ScanWideField.hpp
#	core/libs/prx/libc/src/Formatting.cpp
#	core/libs/prx/libc/src/ScanWideField.cpp
#	core/libs/tests/Formatting.cpp
#	core/libs/tests/GuestWideStreamScan.cpp
#	docs/dev/debt/libc.md
@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 d32bbca merged onto main 5b1d381 · tested 2026-11-04 14:34 UTC · 24 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,758 passed · 15 failed (0 new, 12 also fail on main, 3 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,834 of 3,883 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 (1375 tests run on the GPU)
Slow tests (>30 s, GPU tests timed with validation layers) ⚠️ agc_driver_pipeline_journal 120.1 s, ⚠️ agc_driver_graphics 89.4 s, ⚠️ agc_driver_graphics_maps_fallback 88.0 s, ⚠️ public_headers 59.8 s, ⚠️ agc_driver_image_sample_unnormalized 47.5 s
Unstable on main (3, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_alpha_to_coverage_sample_mask_export: failed in 4 of the last 10 main runs
agc_driver_pipeline_journal: failed in 8 of the last 10 main runs
agc_driver_two_sample_alpha_to_coverage_sample_mask_export: failed in 3 of the last 10 main runs
Failing on main too (12, not counted against this PR)
agc_driver_guest_memory_lifetime_direct
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
Validation IDs already present on main (8 IDs in 794 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (794 tests): agc_compute_pipeline_replay, agc_driver, agc_driver_address_passes, agc_driver_address_passes_draw_transitions, agc_driver_address_passes_targets_split, agc_driver_alias_copy_label, agc_driver_alpha_to_coverage, agc_driver_alpha_to_coverage_sample_mask_export, and 786 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
VUID-VkSamplerCreateInfo-addressModeU-01079 (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeU-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeV-parameter (1 test): agc_driver_image_gather_volume
VUID-VkSamplerCreateInfo-addressModeW-parameter (1 test): agc_driver_image_gather_volume
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_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_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 SDL or not available in current SDL video
Reproduce
git fetch origin d32bbca8b5de931dc294cfc2196d26a74996f2e3 5b1d381d5ad5d9f923326b18479c3bd889cdd588
git checkout 5b1d381d5ad5d9f923326b18479c3bd889cdd588 && git merge --no-ff d32bbca8b5de931dc294cfc2196d26a74996f2e3
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 4, 2026

This branch has not been deployed

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

Labels

docs libc needs rebase Conflicts with main, rebase needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants