mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
fix: correct loading L0 loader functions
- don't load ze_loader.dll from file system - to perform self-open on Windows use getModuleHandleA with proper module name - don't free library loaded with getModuleHandleA - as loader may be not available during runtime teardown: - load translate handle function during global setup - load setDriverTeardown function during global teardown - when loader is not available during teardown, unset translate handle function Related-To: GSD-10147 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
9d6d6e85f1
commit
4154e6666b
@@ -42,7 +42,7 @@ struct IgaWrapper::Impl {
|
||||
iga.optsContext.cb = sizeof(igaLib.optsContext);
|
||||
iga.optsContext.gen = igaGen;
|
||||
|
||||
iga.library.reset(NEO::OsLibrary::loadFunc(Os::igaDllName));
|
||||
iga.library.reset(NEO::OsLibrary::loadFunc({Os::igaDllName}));
|
||||
if (iga.library == nullptr) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ int OclocFclFacade::initialize(const HardwareInfo &hwInfo) {
|
||||
}
|
||||
|
||||
std::unique_ptr<OsLibrary> OclocFclFacade::loadFclLibrary() const {
|
||||
return std::unique_ptr<OsLibrary>{OsLibrary::loadFunc(Os::frontEndDllName)};
|
||||
return std::unique_ptr<OsLibrary>{OsLibrary::loadFunc({Os::frontEndDllName})};
|
||||
}
|
||||
|
||||
CIF::CreateCIFMainFunc_t OclocFclFacade::loadCreateFclMainFunction() const {
|
||||
|
||||
@@ -112,7 +112,7 @@ int OclocIgcFacade::initialize(const HardwareInfo &hwInfo) {
|
||||
}
|
||||
|
||||
std::unique_ptr<OsLibrary> OclocIgcFacade::loadIgcLibrary() const {
|
||||
return std::unique_ptr<OsLibrary>{OsLibrary::loadFunc(Os::igcDllName)};
|
||||
return std::unique_ptr<OsLibrary>{OsLibrary::loadFunc({Os::igcDllName})};
|
||||
}
|
||||
|
||||
CIF::CreateCIFMainFunc_t OclocIgcFacade::loadCreateIgcMainFunction() const {
|
||||
|
||||
@@ -88,7 +88,7 @@ void SehException::getCallStack(unsigned int code, struct _EXCEPTION_POINTERS *e
|
||||
DWORD displacement = 0;
|
||||
DWORD64 displacement64 = 0;
|
||||
|
||||
std::unique_ptr<NEO::OsLibrary> psApiLib(NEO::OsLibrary::loadFunc("psapi.dll"));
|
||||
std::unique_ptr<NEO::OsLibrary> psApiLib(NEO::OsLibrary::loadFunc({"psapi.dll"}));
|
||||
auto getMappedFileName = reinterpret_cast<getMappedFileNameFunction>(psApiLib->getProcAddress("GetMappedFileNameA"));
|
||||
|
||||
size_t callstackCounter = 0;
|
||||
|
||||
Reference in New Issue
Block a user