[SYCL][RTC][Windows] Runtime compilation prone to fail silently in Windows debug builds
- Dominant language
- LLVM
- Stars
- 1.5k
- Forks
- 854
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 137
Description
While we build the SYCL runtime library twice (`sycl8.dll` and `sycl8d.dll`, linked again release and debug versions of `VCRUNTIME` and `ucrtbase`), the `sycl-jit` library backing the `kernel_compiler` extension's implementation is always linked according the CMake build type. Even in a debug build, SYCL applications produced by DPCPP are linked by default against `sycl8.dll`, resulting in a runtime mismatch with `sycl-jit.dll` that ultimately leads to heap corruption when the SYCL runtime triggers destruction of objects allocated inside `sycl-jit`.
The crash of the application is immediate and does not produce any output. The heap corruption error is observable in a debugger session, though.
It seems possible to force the application to be linked against `sycl8d.dll` when using the `clang-cl` driver (e.g. `clang-cl -fsycl /EHs /MDd ...`); then runtime compilation works as expected.
Contributor guide
Assessment
This issue has not been assessed yet.