Avoid overflow in Windows preparation timestamps #1517
No reviewers
Labels
No labels
accessibility
autorelease: pending
autorelease: tagged
bug
dependencies
documentation
duplicate
enhancement
github_actions
good first issue
help wanted
invalid
question
testing wanted
wontfix
No milestone
No assignees
1 participant
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Hookshot!1517
Loading…
Reference in a new issue
No description provided.
Delete branch "codex/fix-windows-seed-time"
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?
What this fixes
On Windows, checking the prepared-shader stamp overflows signed 64-bit arithmetic in both FILETIME-to-nanosecond conversions. This removes undefined arithmetic at startup; no wrong preparation decision or game stutter was reproduced. Follow-up to #1387.
Why merge
Change
gpu/vk/vk_draw.cpp: remove both overflowing multiplications and express the Windows slack in ticks.tests/test_prepare_seed_stamp.py: check the native Windows clocks, the safety window and migration of old records.Tested
python -I -B tests/run_all.py --jobs 1 --strict prepare_seed_stampwith GCC on PATH: 1 passed, 0 skipped; real helpers, synthetic files and record migration.Not covered