KhronosGroup/SPIRV-LLVM-Translator

[Coverity] Potential `nullptr` dereference

Open

#3,179 opened on 2025年5月16日

GitHub で見る
 (0 comments) (0 reactions) (0 assignees)LLVM (270 forks)auto 404
buggood first issue

Repository metrics

Stars
 (616 stars)
PR merge metrics
 (PR metrics pending)

説明

See details at https://scan.coverity.com/projects/intel-llvm?tab=overview as CID 490176:

https://github.com/KhronosGroup/SPIRV-LLVM-Translator/blob/590068b12402262dd9bd0aa1386f2e89babfa8a1/lib/SPIRV/SPIRVReader.cpp#L1109

If we don't expect the cast to fail, then we should use cast instead of dyn_cast. The former contains an assertion instead of runtime check

コントリビューターガイド