User: validate RegisterClassExA size and enforce console window sizing (#106) #1436
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1436
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-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?
@slopgobblercobbler on GitHub · 2026-11-24 15:56 UTC · original
slopgobblercobbler:fix/user-wnd-validation→main· +160 −9 · 1 files · 1 commits · openSummary
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
@Anon64 on GitHub · 2026-11-24 16:24 UTC · original
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.
@futurepro62 on GitHub · 2026-11-24 16:53 UTC · original · edited 2026-11-24 17:02 UTC
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
@DavidM1911 on GitHub · 2026-11-24 18:52 UTC · original
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!
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.