refactor: Handle dlopen error

Related-To: NEO-13922

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2025-02-19 13:34:15 +00:00
committed by Compute-Runtime-Automation
parent 28c008e438
commit 42261526e4
2 changed files with 12 additions and 0 deletions

View File

@@ -85,6 +85,9 @@ std::string OsLibrary::getFullPath() {
bool isLibraryLoaded(const std::string &libraryName) {
auto handle = SysCalls::dlopen(0, RTLD_LAZY);
if (!handle) {
return false;
}
struct link_map *map = nullptr;
int retVal = NEO::SysCalls::dlinfo(handle, RTLD_DI_LINKMAP, &map);
if (retVal == 0 && map != nullptr) {