memory: stop logging clamped buffer ranges #2540
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
GPU
GUI
help wanted
question
Shaders
Video
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/KytyPS5--KytyPS5!2540
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2540/head"
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?
@Nawid3333 on GitHub · 2026-11-24 07:36 UTC · original
Nawid3333:fix/stop-logging-clamped-ranges→main· +0 −5 · 1 files · 4 commits · merged 2026-11-25 01:13 UTCClampRangeSizewritesMemory: clamped buffer range addr=... size=... to ...each time it shortens a buffer range that reaches past mapped memory. Games bind the same oversized buffer again and again, so tester logs fill with the same line:_kyty.txtKytyPS5-2026-11-14-3e226bfKytyPS5-2026-11-21-6133172KytyPS5-2026-11-16-1e87171KytyPS5-2026-11-16-d45b086Logs this size are too large to attach, so testers have to cut them down first. The clamp itself stays, and an empty result still stops with
attempted to access invalid address. Only the log line goes, like the flip and vblank poll lines inf0708e70f.Test
Log text only, so no unit test. Fork CI (Windows, Linux, macOS): https://github.com/Nawid3333/KytyPS5/actions/runs/45336201063/attempts/2
No game run of this branch.
Written with Claude Code (AI): Claude Code wrote the change and counted the lines in the tester logs.
🤖 Generated with Claude Code
@coderabbitai[bot] on GitHub · 2026-11-24 07:37 UTC · original · edited 2026-11-25 01:16 UTC
No actionable comments were generated in the recent review.
Walkthrough
ClampRangeSize now suppresses a clamp warning when the same
{vaddr, size, clamped_size}tuple was previously logged on the current thread. It logs a warning when that tuple changes. Clamp results and invalid-address failure behavior remain unchanged. A new test checks returned sizes and verifies the warning count across five calls.Suggested reviewers:
nmzikChange: Other
Merge Risk:
Minimal · up to
64ec9This change reduces repeated clamp warnings in logs and does not alter clamping results or error behavior. A new test covers the logging behavior. I see no remaining merge risk.
Pre-merge checks:
4
Full details: Title check
Explanation
The title "memory: stop logging clamped buffer ranges" matches the main change: ClampRangeSize no longer logs every shortened range, and the log line is now printed only when the range differs from the last logged one. The title is specific and concise, and it omits only the test addition, which is expected.
Full details: Description check
Explanation
The description explains the ClampRangeSize log line that is removed, why testers' logs grow too large, and the affected reports. It also states that the clamp remains, that the change touches only log text, and what CI ran. It is directly related to the changeset.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Share
8ba871d0-6a29-4663-8936-af8e53403bfdReviewing files that changed from the base of the PR and between
4d37a35a05and64ec9f9fe1.src/kernel/memory.cpptests/VirtualMemoryAllocationTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
@coderabbitai[bot] on GitHub · 2026-11-24 09:03 UTC · original · reviewed
Actionable comments posted: 1
07684f3f-a4bc-42c0-92e3-843ca1cba72bReviewing files that changed from the base of the PR and between
eb08c9f0c5and4d37a35a05.src/kernel/memory.cpptests/VirtualMemoryAllocationTests.cppIncluded review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
@coderabbitai[bot] on GitHub · 2026-11-24 09:03 UTC · original · edited 2026-11-24 09:12 UTC
On
src/kernel/memory.cppline 855 (outdated):Do not record clamps that silent logging discards.
If a thread clamps A while logging is silent,
std::exchangestill records A. If logging is then enabled, repeating A produces no warning, although this thread never printed A.Check
Log::IsSilent()before updatinglogged_clamp. This preserves suppression for visible A,A and logging for visible A,B,A.The commit objective specifies the last clamp this thread printed.
✅ Addressed in commit
64ec9f9