oneapi-src / oneapi-src/level-zero
zeKernelGetSourceAttributes: invalid ERROR_INVALID_NULL_POINTER with parameter validation
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 335
- Forks
- 140
- Avg merge
- 12h 32m
- Merged PRs (30d)
- 5
Description
When invoking zeKernelGetSourceAttributes with a nullptr pString pointer to obtain the attribute size, https://github.com/intel/compute-runtime/blob/128cd8a31c16977ecc41bf13bdd35c2ac4907a5b/level_zero/core/source/kernel/kernel_imp.cpp#L443-L445, the validator erroneously throws an ERROR_INVALID_NULL_POINTER, https://github.com/oneapi-src/level-zero/blob/284ccb089184180e34864a9f1e23971d3d736bd8/source/layers/validation/ze_valddi.cpp#L3087-L3088
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked zeKernelGetSourceAttributes implementation in level_zero/core/source/kernel/kernel_imp.cpp at lines 443-445 and the validation logic in ze_valddi.cpp at lines 3087-3088. Trace the nullptr size-query path and verify that validation no longer reports ERROR_INVALID_NULL_POINTER for that call while other invalid arguments remain handled correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100