Skip to content

fix(libc): store a scanned NaN as the default quiet NaN in sscanf_s - #12532

Merged
adriadam10 merged 2 commits into
boykopovar:mainfrom
JJenkx:windows/libc-scanf-s-nan
Nov 6, 2026
Merged

adriadam10 merged 2 commits into
boykopovar:mainfrom
JJenkx:windows/libc-scanf-s-nan

Conversation

@JJenkx

@JJenkx JJenkx commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Current-main integration — 2026-11-05. Exact head 5c3cff5ecd2e5128aab2ac390649dd9da4b0b330 retains previous public 3e78245d86df6a16aadd1d8b96b494a6744d0fa8 and tested main 6d173c1a19788ff69d43b3d0ca62833e312ef939 as ancestors. The bounded native-host NaN read and explicit ten-byte guest x87 NaN helper remain byte-identical to the previous public head, including padding tests. Actual current #12530 parent af0443d37194a7000804f22c1e71c82cae572dbd is retained by a history-only merge with an unchanged source tree. No full eight-byte-host long-double library port is claimed.

Linux x86-64, GCC16.2.1, Ninja Release: actual production modules and focused fixture owners rebuilt; 3/3 runtime tests pass, zero skips: guest_formatting, guest_stdio_variadic, guest_scan_count. Matching pinned main passes all25 selected baseline groups. Production NID patching, conventions/whitespace, and MinGW syntax for Formatting.cpp pass.

Public-header audit: failed on both pinned main and this head with the same five missing WKSecurityOrigin* declarations (Create, CopyToString, CopyHost, CopyProtocol, GetPort), with no additional declaration errors. The failure is retained in the logs; no all-green header/full-suite claim is made. The concrete shared-main repair is #16010, exact head 545e24b2ee2e549001421f7fc9f87ff801f3423c. Its independent qualification reports a green audit of 406 libraries/30,572 exports and two standalone units compiled by each of GCC and MinGW. A maintainer still needs to merge that repair and rerun the affected checks; this unmodified qualification tree is not relabelled header-green.

The older-main Windows DepthSurface::createSampleShadow allocation compile error is already corrected by merged #15855. This head contains that fix, and its DepthSurface.cpp/ImageMemory.hpp blobs match the fixing source. The fix’s hosted Windows build passed; that is attributed upstream evidence, not a Windows build/runtime result for this head. No duplicate AGC change was added. A final merge preview against newer main 7ad9749ed0311cc91d69bc7c690d09c92b9d42d0 is clean; qualification remains pinned to 6d173c1a19788ff69d43b3d0ca62833e312ef939.

Source/parent/provider/gitlink proofs, commands, raw logs, JUnit, hashes and known baseline failure. Historical platform, module-reference and performance reports below retain their original pins; no new Windows/macOS, SDK/physical-console, title/GPU or performance run.

Earlier pinned reports and the contribution template follow.

Refreshed against main 0263899e996f26b165aed37f6b5a616dd1d4c6bb; current head 3e78245d86df6a16aadd1d8b96b494a6744d0fa8 retains previous public head 6d16add5fb12bcc42bb50e987a07b9ab90ee4f4c 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 #12530, which is on #12507. Current head 6d16add5fb12bcc42bb50e987a07b9ab90ee4f4c includes the helper correction and main integration; the original subject commit 92c6891d1c is historical.

What

sscanf_s and vsscanf_s now store every NaN a floating conversion reads as the positive default quiet NaN, as the libc.prx that titles ship does. The host scanners keep the sign of -nan, so main stored a negative NaN.

input width titles (PPSA07923, PPSA05916) main
-nan, -NaN, -nan(0x5) %f 0x7fc00000 0xffc00000
same %lf 0x7ff8000000000000 0xfff8000000000000
same %Lf 0x7fff:c000000000000000 0xffff:c000000000000000

nan, NAN, +nan, nan(1) and nan() already gave the positive default NaN.

After the host has stored its native value, the scanner classifies it within that value’s width. A %Lf NaN is written as ten explicit guest x87 quiet-NaN bytes, leaving the trailing padding untouched; other widths use std::numeric_limits<T>::quiet_NaN(). This also covers the stream forms (fscanf_s, scanf_s), because it runs after the store.

This is the same rule #12514 measured for swscanf. Plain sscanf takes a separate path (glibc on Linux, WindowsScanning.hpp on Windows) and the titles behave the same there, but it isn't changed here. It is part of the narrow-scanner work planned after #9087.

Tested

Windows 11 Enterprise 10.0.22621, Ryzen 9 5950X, WinLibs GCC 15.2.0 UCRT r7, Ninja, Release, BUILD_TESTING=ON, head 92c6891d1c.

Current Linux qualification — 2026-10-29

Addressed the helper’s 8-byte-host overflow and the padding-test suggestion in 8f74e7ad1d7. After successful host scanning, NaN classification reads the native host value width (bounded by the requested value bytes). A NaN in the %Lf path is emitted as ten explicit guest x87 quiet-NaN bytes; other widths and finite conversions are unchanged. The regression now checks that bytes10–15 remain untouched.

Linux Release: guest_formatting, guest_stdio_variadic and guest_scan_count pass three times (9 checks), then all9 pass after restoration. A production mutant writing16bytes instead of10 fails the new padding assertion; restored libc is byte-identical. An ASan+UBSan harness extracted from the actual helper reproduces the parent’s stack over-read with GCC -mlong-double-64; the correction passes both that helper-only ABI model and native x87 checks, including exact NaN bits, finite preservation and tail guards. Conventions and whitespace pass.

The caller writes host scanf output before this helper runs; the helper is not parsing an existing guest80 value on an8-byte host. The full library’s x87 requirement remains unchanged: this does not establish a full8-byte-long-double library/ARM64/macOS port, and no new Windows or title-library comparison is claimed. AI-assisted: yes.

Current-main integration: normal fast-forward merge 6d16add5fb12bcc42bb50e987a07b9ab90ee4f4c now includes main 157b02c4f1803e9d2cd757677b9a805961203fc4. The only conflict was <bit> versus ScanQuadLength.hpp; both includes and every nonblank added test line from main and this stack are retained. The NaN helper is byte-identical to the qualified correction, and the actual #12530 ancestry remains intact. All three focused groups pass three repetitions on this integrated source (9 more passes), with conventions and whitespace clean.

Evidence: immutable Linux qualification bundle. Its SHA-256 is ca6b35926bcc6d3f21a9650517894c86b65594e2e2b653c5c32cd1c1de89c835. No fresh Windows runtime execution is claimed; older measurements retain their recorded source pins.

AI-assisted: yes (Codex).

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): fail a 0x with no hex digit and keep errno for in-range floats in sscanf_s #12530 (actual current parent af0443d37194a7000804f22c1e71c82cae572dbd)
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes (Claude Code)

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 28, 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 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 9087 core/libs/prx/libc/src/Formatting.cpp
core/libs/tests/Formatting.cpp
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 14085 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 — changes requested

On hosts where long double is 8 bytes, the new %Lf NaN normalization copies 10 bytes from an 8-byte temporary, which AddressSanitizer reports as a stack-buffer-overflow; it also does not encode the expected x87 80-bit quiet NaN.

What I ran

Reviewed head 92c6891d1cdec64888aac01dbabdcea24b97101e against its declared base e4da19aff06e25ae16b90f460dff22e8ac1eb786; the cumulative PR merges cleanly onto current main at f21ef7c99c5af648c5a41bddb18ce118b8e60c46. Environment: Debian 12 x86_64, GCC 12.2. git diff --check passed. I also compiled the new helper behavior with GCC’s -mlong-double-64 mode to model the 8-byte long double ABI noted for macOS ARM in this PR’s own documentation.

git merge-tree $(git merge-base upstream/main pr/12532) upstream/main pr/12532
git diff --check upstream/main...pr/12532
g++ -std=c++20 -mlong-double-64 -fsanitize=address -g /tmp/pr12532_ld80_probe.cpp -o /tmp/pr12532_ld80_probe
/tmp/pr12532_ld80_probe

The probe source applies the PR’s StoreDefaultNaN<T> implementation to a 16-byte guest buffer whose first eight bytes contain a negative binary64 NaN, with StoreDefaultNaN<long double>(guest, 10). The address sanitizer reports the 10-byte read from the 8-byte local value.

Results

Check Result
Merge onto current main Clean
git diff --check Pass; no output
8-byte long double ASan probe Fails with stack-buffer-overflow at the memcpy(target, &value, bytes) operation
Non-ASan probe output mantissa=7ff8000000000000 exponent=b2a0 sizeof(long double)=8; this is not the PR test’s expected x87 encoding (mantissa= c000000000000000, exponent=7fff)
Hosted Windows job Pass; the selective CTest step was skipped
Linux and specialized checks Linux skipped; several macOS jobs were pending when checked
AddressSanitizer output
=================================================================
==2079376==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x7ffe5e0c2078 at pc 0x7f082884814b bp 0x7ffe5e0c2030 sp 0x7ffe5e0c17e0
READ of size 10 at 0x7ffe5e0c2078 thread T0
    #0 0x7f082884814a in __interceptor_memcpy ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:827
    #1 0x559816915685 in void StoreDefaultNaN<long double>(void*, unsigned long) /tmp/pr12532_ld80_probe.cpp:12
    #2 0x559816915312 in main /tmp/pr12532_ld80_probe.cpp:19
    #3 0x7f0828245249  (/lib/x86_64-linux-gnu/libc.so.6+0x27249)
    #4 0x7f0828245304 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x27304)
    #5 0x559816915130 in _start (/tmp/pr12532_ld80_probe+0x1130)

Address 0x7ffe5e0c2078 is located in stack of thread T0 at offset 40 in frame
    #0 0x559816915523 in void StoreDefaultNaN<long double>(void*, unsigned long) /tmp/pr12532_ld80_probe.cpp:7

  This frame has 1 object(s):
    [32, 40) 'value' (line 8) <== Memory access at offset 40 overflows this variable
HINT: this may be a false positive if your program uses some custom stack unwind mechanism, swapcontext or vfork
SUMMARY: AddressSanitizer: stack-buffer-overflow ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:827 in __interceptor_memcpy
==2079376==ABORTING

Negative control

Assertion Change to code under test Did the check fail?
No read beyond the temporary and the guest receives the expected 80-bit NaN No mutant/negative control run; the ASan probe reproduced the current code’s failure Not applicable

Findings

Blocking

  • StoreDefaultNaN<long double>(target, 10) assumes the host temporary contains at least 10 bytes. On macOS ARM, the PR’s own debt entry notes that long double is double, so sizeof(value) is 8. The 10-byte memcpy reads two bytes beyond the local object, and copying the host binary64 NaN bytes does not produce the 80-bit guest representation asserted by the test. Encode the guest’s 80-bit quiet NaN using an explicit guest-format representation (or an equivalent host-independent conversion), and add/run a test with sizeof(long double) == 8 under AddressSanitizer.

Non-blocking

None identified in this check.

Sources

Not verified

I did not run the complete project test suite or execute this on a physical Apple Silicon host. The sanitizer probe models an 8-byte long double ABI and exercises the exact helper operation; hosted macOS formatting tests were not complete when checked.

To get this to a good state

Please make the NaN normalization safe when the host long double is 8 bytes and ensure it writes the guest’s 80-bit representation. Add a focused regression that runs with that ABI under AddressSanitizer. I will rerun the same probe and review the updated diff on the new head.

@adriadam10 adriadam10 self-assigned this Oct 28, 2026

@rooklz rooklz 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 the top commit 92c6891d1c only, as the body asks. #12530 and #12507 are below it.

Linux build (Ubuntu 24.04 amd64 container, GCC 13, Release, BUILD_TESTING=ON, head 92c6891d1c)

  • guest_formatting, guest_stdio_variadic, guest_scan_count: all 3 pass.
  • RED check: I put the parent's (3eca2be067) Formatting.cpp under the head tests, and guest_formatting fails. The new checks catch the old behaviour.

What glibc stores, and what the helper does with it (I copied StoreDefaultNaN into a standalone program, same container)

input host %f / %lf / %Lf after StoreDefaultNaN
-nan, -NaN, -nan(0x5) ffc00000 / fff8000000000000 / ffff:c000000000000000 7fc00000 / 7ff8000000000000 / 7fff:c000000000000000
nan, NAN, +nan, nan(), nan(1), nan(0x123) already the default NaN unchanged
-inf, -0, 0x1p3 sign kept unchanged (the NaN check gates correctly)

For %Lf, bytes 10..15 stay as they were. Only the 10 value bytes are written, matching what the host stores.

Mutants against the head tests

mutant result
drop the L branch killed
drop the l branch (falls to float) killed
%Lf writes sizeof(long double) (16) instead of 10 survives
fix only sign-bit NaNs (!isnan || !signbit) survives. Equivalent on glibc, which never yields a positive non-default NaN from text (payloads are dropped, see the table)
!suppress → target != nullptr survives. Equivalent, since a null target already returns EOF

The surviving 16-byte mutant would overwrite the 6 bytes after a guest's 10-byte long double. The extended buffer in the test is uninitialised and only bytes 0..9 are checked, so nothing catches it. This test-only change kills it (head passes, mutant and parent fail):

             unsigned char extended[16];
+            std::memset(extended, 0x55, sizeof(extended));
             Require(ScanListS(input, "%f", &single) == 1 && std::bit_cast<std::uint32_t>(single) == 0x7fc00000u);
@@
             Require(mantissa == 0xc000000000000000ull && exponent == 0x7fff);
+            Require(std::all_of(extended + 10, extended + 16, [](unsigned char byte) { return byte == 0x55; }));
         }

(<algorithm> is already included.)

Other checks

  • memcpy(target, &value, 10) from a host long double is safe, because the libc target already static-asserts an x87 80-bit long double (Math.cpp:140), and macOS builds of the libs force x86_64.
  • check_conventions --base upstream/main passes, and git merge-tree against upstream/main f21ef7c is clean. pr_overlap shows file-level sharing only on docs/dev/debt/libc.md and with your #12397, and a pairwise merge-tree with #12397 is clean.

No defects in the fix. The one suggestion is the padding check above.

@JJenkx

JJenkx commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

Addressed the helper’s 8-byte-host overflow and the padding-test suggestion in 8f74e7ad1d7. After successful host scanning, NaN classification reads the native host value width (bounded by the requested value bytes). A NaN in the %Lf path is emitted as ten explicit guest x87 quiet-NaN bytes; other widths and finite conversions are unchanged. The regression now checks that bytes10–15 remain untouched.

Linux Release: guest_formatting, guest_stdio_variadic and guest_scan_count pass three times (9 checks), then all9 pass after restoration. A production mutant writing16bytes instead of10 fails the new padding assertion; restored libc is byte-identical. An ASan+UBSan harness extracted from the actual helper reproduces the parent’s stack over-read with GCC -mlong-double-64; the correction passes both that helper-only ABI model and native x87 checks, including exact NaN bits, finite preservation and tail guards. Conventions and whitespace pass.

The caller writes host scanf output before this helper runs; the helper is not parsing an existing guest80 value on an8-byte host. The full library’s x87 requirement remains unchanged: this does not establish a full8-byte-long-double library/ARM64/macOS port, and no new Windows or title-library comparison is claimed. AI-assisted: yes.

Current-main integration: normal fast-forward merge 6d16add5fb12bcc42bb50e987a07b9ab90ee4f4c now includes main 157b02c4f1803e9d2cd757677b9a805961203fc4. The only conflict was <bit> versus ScanQuadLength.hpp; both includes and every nonblank added test line from main and this stack are retained. The NaN helper is byte-identical to the qualified correction, and the actual #12530 ancestry remains intact. All three focused groups pass three repetitions on this integrated source (9 more passes), with conventions and whitespace clean.

Evidence: immutable Linux qualification bundle. Its SHA-256 is ca6b35926bcc6d3f21a9650517894c86b65594e2e2b653c5c32cd1c1de89c835. No fresh Windows runtime execution is claimed; older measurements retain their recorded source pins.

@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 (6d16add5fb) 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)

@JJenkx

JJenkx commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

@MarcZX10 Please re-review unchanged current head 6d16add5fb12bcc42bb50e987a07b9ab90ee4f4c with the bounded helper correction and qualification. The helper avoids an out-of-bounds host classification and constructs the ten-byte guest NaN explicitly; the eight-byte-host helper control and ASan evidence retain their stated pins. This asks for review of that scoped helper fix, with no claim of a complete eight-byte-long-double library, ARM64 or macOS port. AI-assisted: yes (Codex).

@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.

Re-checked — new head, looks good

At 6d16add5fb12bcc42bb50e987a07b9ab90ee4f4c, the %Lf NaN helper reads only the host value width, writes the ten-byte guest x87 NaN explicitly, and preserves trailing padding.

What I ran

Reviewed head 6d16add5fb12bcc42bb50e987a07b9ab90ee4f4c against base 157b02c4f1803e9d2cd757677b9a805961203fc4; the dependency stack preview was clean against current main f5b82ff45302cd6748a58868611a3dbe89211cdd. Environment: Linux x86_64, Python 3.11.2. No local C++ build or test was run.

git diff --check 157b02c4f1803e9d2cd757677b9a805961203fc4...6d16add5fb12bcc42bb50e987a07b9ab90ee4f4c
python3 tools/check_conventions.py --base 157b02c4f1803e9d2cd757677b9a805961203fc4 --head 6d16add5fb12bcc42bb50e987a07b9ab90ee4f4c --title 'fix(libc): store a scanned NaN as the default quiet NaN in sscanf_s' --body /tmp/anyps5-pr-precheck/boykopovar-AnyPS5-pr-12532-6d16add5fb12/pr-body.md
python3 tools/pr_precheck.py --repo boykopovar/AnyPS5 --pr 12532

Results

Check Result
Diff and conventions Passed
Dependency integration #12507 → #12530 → #12532 all preview cleanly against current main; declared dependencies are included in the head
Hosted checks Windows, Linux relinker, macOS relinker, ASan, register-context, and write-watch jobs passed; product Linux job was skipped
Focused test evidence PR participant reports 3/3 passes for the three focused Linux groups and 5/5 Windows guest_formatting runs on the current head
Precheck helper availability Its optional ABI and test-quality helper copies were absent from the isolated PR checkout; no public exports change in this PR
Unedited local convention output
All conventions checks passed.

Negative control

Assertion Change to code under test Outcome
Ten-byte guest NaN write preserves bytes 10–15 PR participant reports changing production output to 16 bytes while retaining the test Test failed as expected; the reported restored source passed
Helper avoids an 8-byte-host overread PR participant reports an ASan+UBSan helper harness using GCC -mlong-double-64 The parent reproduced the overread; the corrected helper passed the reported control. I did not run this harness locally.

Sources

Not verified

I did not reproduce the native title comparison, Windows or Linux tests, or sanitizer harness. The PR explicitly does not establish a full libc port for hosts whose long double is eight bytes; that broader platform behavior remains outside this change. Console behavior beyond the cited title measurements is not verified.

@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 3e78245d86 merged onto main b611e634f7 (96768a0c5f, 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 3e78245 merged onto main b611e63 · tested 2026-11-05 02:24 UTC · 30 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,822 passed · 14 failed (0 new, 13 also fail on main, 1 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_pipeline_journal 120.1 s, ⚠️ agc_driver_graphics 82.5 s, ⚠️ agc_driver_graphics_maps_fallback 75.2 s, ⚠️ agc_driver_image_sample_unnormalized 62.0 s, ⚠️ public_headers 56.0 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 9 of the last 10 main runs
Failing on main too (13, 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_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_emulated_color_compare: Timeout in the parallel run; also passed only on retry in 42 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 3e78245d86df6a16aadd1d8b96b494a6744d0fa8 b611e634f7fc024f0c13e342d96de744448ef1d9
git checkout b611e634f7fc024f0c13e342d96de744448ef1d9 && git merge --no-ff 3e78245d86df6a16aadd1d8b96b494a6744d0fa8
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.

@JJenkx

JJenkx commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Refreshed to 5c3cff5ecd2e5128aab2ac390649dd9da4b0b330 on tested main 6d173c1a19788ff69d43b3d0ca62833e312ef939, retaining the prior public head. The bounded native-host NaN read and explicit ten-byte guest x87 NaN helper remain byte-identical to the previous public head, including padding tests. Actual current #12530 parent af0443d37194a7000804f22c1e71c82cae572dbd is retained by a history-only merge with an unchanged source tree. No full eight-byte-host long-double library port is claimed.

Fresh Linux CPU-only qualification: 3/3 runtime tests pass, zero skips; actual module/fixture builds, production NID patching, conventions/whitespace and MinGW syntax pass. Public-header auditing remains red on main and this head for exactly the same five missing WKSecurityOrigin declarations; this is recorded, with no header-green claim.

The inherited older-main Windows allocation compile failure is fixed by already merged #15855; the fixing source is preserved here. Its successful Windows build is upstream evidence, not this branch’s Windows qualification. Final merge preview against main 7ad9749ed0311cc91d69bc7c690d09c92b9d42d0 is clean. Historical Windows/native-module reports stay at their original pins.

Immutable source/log/JUnit/control evidence, SHA-256 8cd459887f36477c0d43bb1ef4a3601ede91abb1a54dbc6c54ab43a4ed085c0d. No new Windows/macOS runtime, SDK-module/physical-console, title/GPU or speed claim.

AI-assisted: yes (Codex).

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

JJenkx commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

Refreshed onto main e772fb25cc (merge 6b9b061e8c). 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 6b9b061e8c. 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: failed

PR head 6b9b061 merged onto main e772fb2 · tested 2026-11-05 16:25 UTC · 38 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 (1 new: 1 pass on main with the PR's tests, 10 also fail on main, 6 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 (1402 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 120.1 s, ⚠️ agc_driver_graphics_maps_fallback 116.6 s, ⚠️ agc_graphics_profile_draw 60.2 s, ⚠️ public_headers 58.0 s

Failing tests

This PR changes test files, so each failing test was also built and run on main with only the PR's test changes applied. ✅ there means the failure comes from the PR's other changes; ❌ means the test fails on main too, so this run does not show the PR caused it.

Test With this PR Same test on main e772fb2 (main + this PR's test changes only)
agc_graphics_profile_draw ❌ failed ✅ passed
agc_graphics_profile_draw: Timeout (also failed when re-run alone), assertion and diagnostics
ctest: Timeout

[guestmem] read 0 calls 0 MiB 0.0 s compare 0 calls 0 MiB 0.0 s write 0 calls 0 MiB 0.0 s write-changed 0 calls 0 MiB 0.0 s collect 0 calls 0 MiB 0.0 s verify 1 calls 0 MiB 0.0 s query 0 calls 0 MiB 0.0 s collect-memo hits 0, collect epochs 0 collect-dirty 0 tracker waits 0 / 0 | arena 0x10000+0xfbf
[textures] sampled created: 0 from storage images, 0 cleared on the GPU, 0 snapshots (0 snapshot reads over recorded writes inside cachedTexture, 0 storage-path fallbacks); stage-A records 0: 0 fast hits, 0 full lookups; storage images 0 hits, 0 created, 0 own-object refreshes; image tables 0 reused
[guestmem] read 62 calls 0 MiB 0.0 s compare 0 calls 0 MiB 0.0 s write 44 calls 0 MiB 0.0 s write-changed 5 calls 0 MiB 0.0 s collect 0 calls 0 MiB 0.0 s verify 1702 calls 56 MiB 0.0 s query 0 calls 0 MiB 0.0 s collect-memo hits 0, collect epochs 0 collect-dirty 0 tracker waits 0 / 71 | arena 0x1000
[guestmem] read 135 calls 6 MiB 0.0 s compare 0 calls 0 MiB 0.0 s write 44 calls 0 MiB 0.0 s write-changed 15 calls 0 MiB 0.0 s collect 0 calls 0 MiB 0.0 s verify 110137 calls 598 MiB 0.2 s query 0 calls 0 MiB 0.0 s collect-memo hits 0, collect epochs 0 collect-dirty 0 tracker waits 0 / 74705 | aren
[bufferpool] small: 0 hits, 0 misses, 0 evictions, 0 retained (0 MiB); large: 0 hits, 0 misses, 0 evictions, 0 retained (0 MiB); device: 0 hits, 0 misses, 0 evictions, 0 retained (0 MiB of 512); images: 0 hits, 0 misses, 0 evictions, 0 retained (0 MiB of 128)
[buffers] image mirrors: 0 ranges (0.0 MiB, 0 writable, 0 heap 0.0 MiB), 0 address-based builds served, 0 descriptor sub-ranges bound, 0 sparse heaps bound, 0 rebuilds, 33637 refreshes: 0 blocks compared, 0 copied, 0 refresh syncs; heap refills 0, unwatched heaps 33637, 0 heap mirrors evicted for bu
[descriptors] layouts 0 hits / 0 created, sets 0 from 0 pools and 0 dedicated pools, samplers 0 hits / 0 created
[dcc] 54 scans, 0.0 MiB scanned, 0 memo hits, 0 flush syncs, 0.0 ms; uncompressed keys stored: 0 on the GPU (0 with an unaligned head or tail), 17 on the CPU; key proofs: 0 proved, 0 scanned, 0 unstable
Unstable on main (6, these also failed in recent main runs on this machine; not counted against this PR)
agc_driver_graphics: failed in 3 of the last 10 main runs
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
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
Validation IDs already present on main (4 IDs in 805 tests)
VUID-VkDeviceCreateInfo-pNext-pNext (805 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 797 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 6b9b061e8cd6a47696fb2e58ea1c8df89386b849 e772fb25cc72ee5faf77847f06bbc69533016e82
git checkout e772fb25cc72ee5faf77847f06bbc69533016e82 && git merge --no-ff 6b9b061e8cd6a47696fb2e58ea1c8df89386b849
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
# the failing tests, on this merge and on main:
ANYPS5_REQUIRE_VULKAN=1 ANYPS5_NO_SHADER_CACHE=1 VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation \
  ctest --test-dir build -R '^(agc_graphics_profile_draw)$' --parallel 1 -V

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 6, 2026
JJenkx and others added 2 commits November 6, 2026 13:55
The libc.prx that titles ship (PPSA05916, PPSA07923) stores every NaN a
floating conversion reads as the positive default quiet NaN, whatever
its sign or payload: -nan gives 0x7fc00000 for %f, 0x7ff8000000000000
for %lf and 0x7fff:c000000000000000 for %Lf. The host scanners keep the
sign. The sscanf_s scanner now rewrites a stored NaN, ten bytes for %Lf.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@adriadam10
adriadam10 force-pushed the windows/libc-scanf-s-nan branch from 6b9b061 to e471b2e Compare November 6, 2026 13:01
@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Nov 6, 2026
@JJenkx

JJenkx commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor Author

Linux check of exact head e471b2e3a3: Arch Linux 7.2.11, GCC 16.2.1, Release, BUILD_TESTING=ON, a private worktree of the head with no other change.

guest_formatting and guest_wide_formatting pass 3 of 3 (ctest --repeat until-fail:3). guest_formatting holds this PR's new cases; guest_wide_formatting is the neighbouring group, run as a regression check.

AI-assisted: yes

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

Copy link
Copy Markdown
Collaborator

Re-checked at e471b2e3a3 after the branch was rebuilt on current main: the %Lf NaN store still copies at most sizeof(T) and writes the ten x87 quiet-NaN bytes explicitly, the test pins the float, double and extended bit patterns and the untouched padding, the merge is clean and the debt line is accurate. Windows and Linux runs by @bunbeans2-arch and @rooklz confirm the test fails without the change; 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