Skip to content

Harden _typeconv.select_overload sequence handling - #910

Closed
fallintoplace wants to merge 3 commits into
NVIDIA:mainfrom
fallintoplace:fix-typeconv-select-overload-sequence-checks
Closed

Harden _typeconv.select_overload sequence handling#910
fallintoplace wants to merge 3 commits into
NVIDIA:mainfrom
fallintoplace:fix-typeconv-select-overload-sequence-checks

Conversation

@fallintoplace

Copy link
Copy Markdown

Summary

  • Harden numba_cuda/numba/cuda/cext/_typeconv.cpp select_overload() to use PySequence_Fast() on sigtup, ovsigstup, and each nested overload before item access.
  • Replace unsafe PySequence_Fast_GET_ITEM usage on unchecked objects with explicit conversion, explicit error handling, and consistent cleanup.
  • Add regression tests in numba_cuda/numba/cuda/tests/cudapy/test_typeconv.py for non-sequence inputs, invalid nested overload input, and mismatched overload arity.

Testing

  • Not run in this workspace due environment/tooling constraints.

@copy-pr-bot

copy-pr-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

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.

1 participant