Skip to content

fix(rocdbgapi): exit early if accessing nullptr - #9707

Merged
aktemur merged 1 commit into
developfrom
users/aktemur/nullptr-access
Aug 7, 2026
Merged

fix(rocdbgapi): exit early if accessing nullptr#9707
aktemur merged 1 commit into
developfrom
users/aktemur/nullptr-access

Conversation

@aktemur

@aktemur aktemur commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Motivation

Check for nullptr access and do not attempt to access memory. Give a proper error.

Technical Details

When accessing the memory, check if accessing the nullptr and if so, exit early with an error, so that we don't go into lower layers.

Issue Tracking

Bug: AIROCGDB-645

Test Plan

A new test to be included in ROCgdb.

Test Result

Passes with this patch, fails without.

@aktemur
aktemur requested a review from a team as a code owner August 5, 2026 13:48
@therock-pr-bot

therock-pr-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

❌ PR Check — Action Required

Check Status Details
📝 PR Description ❌ Fail Error: PR description must reference a JIRA ID, ISSUE ID, or a GitHub closing keyword.
Expected: include a JIRA ID / ISSUE ID line (separator : or -, or omitted; value may be a JIRA key, a number with/without #, or a link), OR a closing keyword + issue reference. Accepted examples:
JIRA ID : TESTAUTO-6039
JIRA ID - #330
JIRA ID #330
JIRA ID (on separate line)
ROCM-25757
ISSUE ID : TESTUTO-3334
ISSUE ID #3334
ISSUE ID - TESTAUTO-3433
ISSUE ID (on separate line)
AIRUNTIME-2352
ISSUE ID : https://github.com/<org_name>/<repo_name>/issues/1234
Closes #10
Fixes octo-org/octo-repo#100
Resolves: #123
#123
https://github.com/<org_name>/<repo_name>/issues/123
Current: no valid JIRA/ISSUE/closing-keyword reference found
Forbidden Files ✅ Pass
🧪 Unit Test ⚠️ Warning Error: Source/code files changed without an accompanying unit test.
Expected: add at least one test file named like test_<name>.py / test_<name>.cpp (or <name>_test.*).
Current: code file(s) changed: projects/rocdbgapi/src/memory.cpp; no test file found
🔎 pre-commit ⏳ Pending ⏳ Still running…
🚫 Draft PR 🔜 To Be Enabled
🚩 Feature Flag 🔜 To Be Enabled
📊 Code Coverage 🔜 To Be Enabled

⚠️ 1 policy check(s) failed. Please address the issues above before this PR can be Reviewed.

🚫 Please fix the failed policies

  • ❌ PR Description

The Not ready to Review label was added to this PR. Once all policies pass, the label is removed automatically.

📖 Need help? See the Policy FAQ for details on every check and how to fix failures.

🙋 Wish to Override Policy?

@therock-pr-bot

therock-pr-bot Bot commented Aug 5, 2026

Copy link
Copy Markdown

🚫 Please fix the failed policies before requesting reviews.

The following policy checks failed:

  • ❌ PR Description

The Not ready to Review label has been added to this PR.
Once all policies pass, the label will be removed automatically.

@aktemur

aktemur commented Aug 5, 2026

Copy link
Copy Markdown
Contributor Author

ROCgdb companion PR: ROCm/ROCgdb#250

Comment thread projects/rocdbgapi/src/memory.cpp Outdated
@aktemur
aktemur force-pushed the users/aktemur/nullptr-access branch from 83b4515 to 1d87585 Compare August 5, 2026 15:04

@lancesix lancesix left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@aktemur
aktemur force-pushed the users/aktemur/nullptr-access branch 3 times, most recently from 2f88a32 to edef625 Compare August 6, 2026 09:07

@lumachad lumachad left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. Windows failures unrelated.

@aktemur

aktemur commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

The ASAN failures are unrelated.

When accessing the memory, check if accessing the nullptr and if so,
exit early with an error.

AIROCGDB-645
@aktemur
aktemur force-pushed the users/aktemur/nullptr-access branch from edef625 to f572509 Compare August 7, 2026 06:59
@aktemur
aktemur merged commit d5bfa59 into develop Aug 7, 2026
46 of 49 checks passed
@aktemur
aktemur deleted the users/aktemur/nullptr-access branch August 7, 2026 20:10
systems-assistant Bot pushed a commit to ROCm/ROCdbgapi that referenced this pull request Aug 7, 2026
When accessing the memory, check if accessing the nullptr and if so,
exit early with an error.

AIROCGDB-645
[rocm-systems] ROCm/rocm-systems#9707 (commit d5bfa59)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants