Open
Description
See the issue at https://scan.coverity.com/projects/intel-llvm?tab=overview
CID `489992:
llvm/unified-runtime/source/adapters/level_zero/program.cpp
Lines 391 to 405 in 4c03a9a
Spec constants information put into module descriptor points to heap-allocated data within stack-allocated vector. I'm not familiar enough with the L0 spec to know what is the expected lifetime of spec constant info within the descriptor, but it looks suspicious.
If that pointer is expected to be valid after zeModuleCreate
then we definitely have a bug, because the memory will be de-allocated once we leave urProgramLinkExp
.