diff options
| author | DadaCap <167002618+DadaCap@users.noreply.github.com> | 2026-11-27 16:22:08 +0100 |
|---|---|---|
| committer | DadaCap <167002618+DadaCap@users.noreply.github.com> | 2026-11-27 16:38:40 +0100 |
| commit | b8754f630f4ed67b6ed60a3912805f6e923becc3 (patch) | |
| tree | 74f1cb5685b32f55e92ebd33877771fa30c2b5e2 /runtime/src/xma2_decoder.cpp | |
| parent | 916868ebe050d13726fb14506781d5211dcfadc0 (diff) | |
title_window_plan: bound the twin view without modular arithmetic (RT-TITLE-WINDOW-RETIRE)
title_pool_cover translated a mapping found in the pool's other view back
with `x - (twin - va)` modulo 2^64. A window that starts below the twin
view (m.title_va < twin - va) wrapped to near UINT64_MAX, passed the
pool bounds check, and replace_twin then erased it whole, leaving the
part of it outside the cover unanswered. A twin view that does not fit
in 64 bits (twin < va - pool_lo, or pool_hi - va > UINT64_MAX - twin)
made the twin-view query wrap into an empty range, so a range in the way
was not seen at all.
The twin view's bounds [twin_lo, twin_hi) are now checked up front,
queried in non-wrapping coordinates, and a hit outside the view it was
found in refuses the cover like one outside the pool.
title_window_plan_test: check_pool_cover_bounds with the review's
example (pool [0x100000, 0x500000), va 0x120000, twin 0x420000, window
[0x200000, 0x440000)) and the two overflow cases.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Gt9hwNPurxyJ9LAfUbNiYr
Diffstat (limited to 'runtime/src/xma2_decoder.cpp')
0 files changed, 0 insertions, 0 deletions