Repository navigation
Conversation
✅ All Checks Passed — Ready for Review
📖 Need help? See the Policy FAQ for details on every check and how to fix failures. |
|
🎉 All checks passed! This PR is ready for review. |
newling
commented
Oct 26, 2026
kuhar
reviewed
Oct 27, 2026
kuhar
approved these changes
Oct 27, 2026
newling
force-pushed
the
users/newling/debugger-register-read-observers
branch
from
October 28, 2026 05:45
211cc63 to
efa3157
Compare
Keep the original physical register-file and stored-lane bounds while bypassing execution observers. Remove the added allocation assertions and restore-caller changes, and cover the existing values and bounds with compatibility regressions.
newling
force-pushed
the
users/newling/debugger-register-read-observers
branch
from
October 28, 2026 19:00
efa3157 to
2b3ba80
Compare
Contributor
rocjitsu post-commit fuzz findingThe 32-worker multiplexer campaigns for commit
A retained input can expose a pre-existing defect; this result does not by itself show that the PR introduced it. Download the saved inputs and AFL++ statistics (retained for 14 days). |
Contributor
TheRock Submodule Bump ActivityNewest first
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When ROCgdb captures a stopped wave, rocjitsu copies its scalar and vector registers through
Wavefront::debug_read_sgpranddebug_read_vgpr. Those helpers previously called CU accessors that notify execution plugins. If a load into the inspected register is still pending, the race detector treats debugger inspection as a kernel register read and emits a false race report.This was reproduced through both debugger accessors while reviewing captured-byte race reporting. The helpers were introduced by the ROCgdb support change and already used the observing accessors then. This fix is based directly on develop and is independent of the disassembly change.
The debugger helpers now read register storage without notifying execution plugins and preserve the original returned values and physical bounds. SGPR reads retain the physical-file bounds check in the storage accessor. VGPR reads delegate to a bounded storage accessor in the CU, which checks the actual physical register file and the architecture's stored lane limit. Indices beyond the physical file, and VGPR lanes beyond its stored lane range, still return zero. Normal instruction accesses continue through the observed register API.
The first revision instead added checks against the wave's declared register count and active wave size, returning zero for indices outside those limits. Review raised the alternative of asserting, and a follow-up adopted those assertions plus allocation checks around the restore caller's accesses to
s32ands33.Further inspection showed that both alternatives changed existing behavior. A wave declaring 16 SGPRs occupies a larger physical storage block; the original accessor can read a nonzero value from the slot corresponding to
s32. A wave32 wave backed by 64 stored lanes can also read a lane above 31 through the original CU accessor. Being beyond the declared register count or active wave size does not itself establish C++ undefined behavior when the addressed storage exists. The final choice therefore keeps the existing bounds and values and removes the callbacks. Tightening the allocation contract can be considered separately. The new allocation assertions and their death tests are removed, and debugger restore's existings32/s33preservation code is unchanged from develop.The pending-load regression fails on develop with false SGPR and VGPR reports, with the PC both unchanged and advanced. With the fix, debugger reads return the expected values, produce no callbacks or reports, and leave pending events intact; normal register reads still report the hazards. Compatibility checks cover nonzero physical offsets, reads beyond declared register counts, reads into another allocated block, physical-file bounds, and RDNA4 wave32 reads from 64-lane storage. Nonzero sentinels in the neighboring register verify the lane limit for both 64-lane storage and CDNA5/gfx1250's 32-lane storage. The sentinel tests fail when the debugger helper's lane guard is omitted. Focused native debugger, KFD state-capture and restore, race-detector, and register-observation checks pass with assertions enabled. Changed-file hooks pass. A fresh end-to-end ROCgdb session was not run.
ISSUE ID: #14223 (debugger register-read review finding)