Skip to content

Validate GPU split bucket indices before slicing - #286

Open
mikemikimike wants to merge 1 commit into
Tiiny-AI:mainfrom
mikemikimike:fix/284-validate-gpuidx-index
Open

mikemikimike wants to merge 1 commit into
Tiiny-AI:mainfrom
mikemikimike:fix/284-validate-gpuidx-index

Conversation

@mikemikimike

Copy link
Copy Markdown

Fixes #284

Issue: #284

Summary

  • Validate GPU split index and bucket tensors before using bucket values for row selection.
  • Keep model layer state unchanged until every layer passes validation.
  • Handle invalid slice allocation results without dereferencing null tensors.
  • Add regression coverage for valid, empty, negative, out-of-range, oversized, and zero-row buckets.

Testing

  • cmake -S . -B build-prepr -DCMAKE_BUILD_TYPE=Release -DLLAMA_BUILD_TESTS=ON
  • cmake --build build-prepr --parallel 2
  • ctest --test-dir build-prepr --output-on-failure (19/19 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.

OOB read / SEGV via unvalidated gpu_bucket row index in auto-loaded .generated.gpuidx sidecar

1 participant