Skip to content

Commit 3fd6ea7

Browse files
vishnu-khanthnrspruit
authored andcommitted
fix: Avoid invalid casting into loader objects when DDI extension is supported
Related-To: NEO-15615 Signed-off-by: Vishnu Khanth <vishnu.khanth.b@intel.com>
1 parent 94b04a3 commit 3fd6ea7

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

source/loader/ze_loader_api.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ zelLoaderTranslateHandleInternal(
103103
switch(handleType){
104104
case ZEL_HANDLE_DRIVER:
105105
{
106-
// Determine if legacy loader interception is enabled or
107-
// loader object exists for that handle by checking two conditions:
108-
// 1. DDI Ext is disabled in loader OR
109-
// 2. The input handle's function pointer table matches the loader's dispatch table,
110-
// indicating this handle was created through the loader's intercept layer
106+
// Determine if legacy loader intercept is enabled
107+
// i.e., loader object exists for that handle by checking two conditions:
108+
// 1. DDI Ext is disabled in loader by default OR
109+
// 2. The input handle's function pointer matches the loader's dispatch table pointer,
110+
// indicating that the handle was created through the legacy loader intercept layer
111111

112112
bool legacy_ldr_intercept_enabled = (!loader::context->driverDDIPathDefault) ||
113113
(reinterpret_cast<ze_handle_t *>(handleIn)->pCore->Driver->pfnGet ==

0 commit comments

Comments
 (0)