From b0af08ac0441c810f6c2dc3a89fa61c340ec4f3e Mon Sep 17 00:00:00 2001 From: German Andryeyev Date: Wed, 3 Nov 2021 17:10:21 -0400 Subject: [PATCH] SWDEV-286150 - Fix a crash when LC is forced Change-Id: I1127490502012cdbc0391e45b5d9310f04f9482b --- rocclr/device/hsailctx.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/rocclr/device/hsailctx.hpp b/rocclr/device/hsailctx.hpp index 1b41448386..d459af961f 100644 --- a/rocclr/device/hsailctx.hpp +++ b/rocclr/device/hsailctx.hpp @@ -266,6 +266,11 @@ public: return HSAIL_DYN(aclGetDeviceBinary)(cl, bin, kernel, size, error_code); } static const bool ValidateBinaryImage(const void* binary, size_t length, unsigned type) { +#if defined(HSAIL_DYN_DLL) + if (cep_.aclValidateBinaryImage == nullptr) { + return false; + } +#endif // defined(HSAIL_DYN_DLL) return HSAIL_DYN(aclValidateBinaryImage)(binary, length, type); } static aclJITObjectImage JITObjectImageCreate(aclCompiler *cl, const void* buffer, size_t length, aclBinary* bin, acl_error* error_code) {