Skip to content

Validate pencil halo and padding extents#145

Merged
romerojosh merged 1 commit into
NVIDIA:mainfrom
fallintoplace:fix/validate-pencil-extents
Jun 24, 2026
Merged

Validate pencil halo and padding extents#145
romerojosh merged 1 commit into
NVIDIA:mainfrom
fallintoplace:fix/validate-pencil-extents

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Reject negative halo extents and padding in cudecompGetPencilInfo.
  • Check computed pencil shapes before assigning them to the int32_t shape fields while preserving valid zero-sized empty pencils.
  • Reject pencil size multiplication that would overflow int64_t, including zero-size handling.
  • Add API coverage for invalid extents, empty pencils, oversized shapes, and size overflow.

Validation

  • git diff --check

@romerojosh romerojosh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hi @fallintoplace, thanks for the contribution. Left a comment for you to address with this one.

Comment thread src/cudecomp.cc
Signed-off-by: Minh Vu <vuhoangminh97@gmail.com>
@fallintoplace fallintoplace force-pushed the fix/validate-pencil-extents branch from 8355fcd to f56a257 Compare June 24, 2026 17:51

@romerojosh romerojosh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM! Will merge once build and tests pass. Thanks for the contribution.

Comment thread tests/ctest/api_tests.cc
}
}

TEST_F(ApiGetPencilInfoTest, DescribesEmptyPencils) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for adding this test to enforce the current empty pencil support!

@romerojosh

Copy link
Copy Markdown
Collaborator

/build

@github-actions

Copy link
Copy Markdown

🚀 Build workflow triggered! View run

@github-actions

Copy link
Copy Markdown

✅ Build workflow passed! View run

@romerojosh romerojosh merged commit 049db8a into NVIDIA:main Jun 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants