Skip to content

fix: reject zero or non-uint32 general.alignment - #69

Merged
thxCode merged 1 commit into
gpustack:mainfrom
jpatel2005:fix/invalid-alignment
Nov 15, 2026
Merged

thxCode merged 1 commit into
gpustack:mainfrom
jpatel2005:fix/invalid-alignment

Conversation

@jpatel2005

Copy link
Copy Markdown
Contributor

ParseGGUFFile reads general.alignment with ValueUint32 and uses it as the divisor for the tensor data padding. A value of 0 panics with integer divide by zero, and a value of any other type panics in ValueUint32.

Both now return an error, worded like the type checks in validateMetadata. A missing key still defaults to 32.

TestParseGGUFFile_InvalidAlignment covers both cases and fails without the fix.

Signed-off-by: Jai Patel <mitjaipp@gmail.com>
Copilot AI balanced review requested due to automatic review settings November 15, 2026 06:23

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing. Review the Copilot code review billing settings.

@gpustack-code-review

Copy link
Copy Markdown

✅ OpenCodeReview: Review complete: 0 finding(s) across 1 selected item(s).

@thxCode thxCode 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, thanks.

@thxCode
thxCode merged commit 1d55161 into gpustack:main Nov 15, 2026
2 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.

3 participants