mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 23:33:20 +08:00
Due to the mixed usage of `std::string` objects and C-strings, null terminator characters sometimes propagate into possible `program::updateBuildLog()` inputs. In particular, `TranslationOutput::frontendCompilerLog` and `::backendCompilerLog` get set this way within the `CompilerInterface::build()` API implementation. This becomes an issue whenever each of CL -> IR and IR -> ISA compilation steps emits their warnings and/or errors: `clGetProgramBuildInfo(..., CL_PROGRAM_BUILD_LOG, ...)` also relies on `std::string` to C-string conversion, so the output is trimmed at the first null terminator, i.e. the BE part of the build log simply gets lost. The change handles possible null terminators within `program::updateBuildLog()` and adds relevant regression tests. Related-To: IGC-6509 Signed-off-by: Artem Gindinson <artem.gindinson@intel.com>