User: validate RegisterClassExA size and enforce console window sizing (#106) #1426
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1436"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by slopgobblercobbler on 2026-11-24T15:56:57Z.
Summary
Fixes #106 Item 4:
RegisterClassExAvalidation (crates/xcl/src/hle/user.rs):ERROR_INVALID_PARAMETER).cb_size == std::mem::size_of::<WNDCLASSEXA>() as u32to reject malformed or invalid structure sizes.console_window):SWP_NOSIZEfromSetWindowPosafter subclassing and passesCONSOLE_WxCONSOLE_H(1920x1080) so top-level console windows are resized cleanly regardless of PC display resolution or DPI scaling.console_wndproc):WM_GETMINMAXINFOto setptMaxSize,ptMinTrackSize, andptMaxTrackSizeviaMINMAXINFOto at leastCONSOLE_WxCONSOLE_H.register_class_rejects_null_descriptor,console_window_enforces_frameless_1920x1080_sizing, andconsole_window_unicode_enforces_frameless_1920x1080_sizing.Changes
crates/xcl/src/hle/user.rs:RegisterClassExA: validate null descriptor pointer andcb_size.console_window: enforce 1920x1080 frameless dimensions.console_wndproc: enforce MINMAXINFO dimensions onWM_GETMINMAXINFO.Tested
cargo test -p xcl -- user: 14 passed, 0 failed (100% pass rate).Not Tested
AI Use
Co-Authored-By: Claude Code (Claude Opus 5.5) / Gemini Antigravity
upstream-sync referenced this pull request2026-11-24 16:07:30 +00:00
Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-24T16:24:34Z.
Regression run for this PR: head
058d890, based onmaincbea872. RTX 3060 12 GB (581.80, wave32), Windows 11 26200, release,XCL_NETWORK=0, A pressed every 4 s from 20 s,scripts/smoke.ps1on a retail title for 60 s.main
cbea872:this PR:
No device removals or crashes; 118 % of main's frames, 118 % of its peak commit.
Peak commit in both runs is mostly the pipeline preload's DXC compiles on this machine (#1035; 23 GB on
mainwithXCL_PSO_PRELOAD=0), so it varies run to run.Not tested: the whole suite; whether the title reaches the changed code in these 60 s.
Written with Claude Code (Claude Opus 5.5) from runs on this machine.
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T16:53:34Z.
Full-suite run, since this PR has no test report yet. Tested exact head
058d890(on its basecbea872).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 759 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.register_class_rejects_null_descriptor,console_window_enforces_frameless_1920x1080_sizing,console_window_unicode_enforces_frameless_1920x1080_sizing.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 759 passed, 0 failed, 41 ignored, no skips.Not tested
AI use
upstream-sync referenced this pull request2026-11-24 17:06:49 +00:00
upstream-sync referenced this pull request2026-11-24 18:09:17 +00:00
Imported from ivall/xcl. Originally posted by gut0to on 2026-11-24T18:58:41Z.
Review: COMMENTED
CONTRIBUTING.md requires paired real-title
scripts/smoke.ps1runs for changes undercrates/xcl/src, withmainand this head tested on the same title and for the same duration. The current description has no regression blocks. Please add both smoke results before merge; a title that does not exercise this path still counts if documented. AI-assisted review; I checked the diff scope and description against the guide.upstream-sync referenced this pull request2026-11-24 19:07:33 +00:00
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T18:52:28Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~21 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
upstream-sync referenced this pull request2026-11-24 19:07:54 +00:00
upstream-sync referenced this pull request2026-11-25 02:07:09 +00:00
upstream-sync referenced this pull request2026-11-25 02:07:14 +00:00
upstream-sync referenced this pull request2026-11-25 02:07:15 +00:00
upstream-sync referenced this pull request2026-11-25 09:08:15 +00:00
upstream-sync referenced this pull request2026-11-25 14:10:05 +00:00
upstream-sync referenced this pull request2026-11-25 18:04:27 +00:00
Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-27T21:26:26Z.
Nothing has happened on this PR for 3 days, so it is marked
staleand will be closed in 4 days. A push or a comment takes the mark off: rebase it ontomainif it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T05:44:31Z.
Triage (#1607) – head
058d890No open PR makes the same change. The RegisterClassExA size check is already on main (#179); comparing cb_size with size_of::() instead of WndClassEx changes nothing (both are 80 bytes), so only the SetLastError on a null descriptor is new there.
The real fix is in console_wndproc: main writes m[6]/m[7] (offset 24, ptMinTrackSize) under a comment saying ptMaxTrackSize, so the maximum track size is never raised; this PR uses MINMAXINFO fields and also resizes the window with SetWindowPos after subclassing. #794 touches the same SetWindowPos call for a different reason (showing the window when cloaking is unavailable), so the two will conflict.
Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.