Skip to content

Change the way we load level zero DLL on windows.#636

Merged
diptorupd merged 1 commit intoIntelPython:masterfrom
diptorupd:fix/dll_load
Oct 26, 2021
Merged

Change the way we load level zero DLL on windows.#636
diptorupd merged 1 commit intoIntelPython:masterfrom
diptorupd:fix/dll_load

Conversation

@diptorupd
Copy link
Copy Markdown
Contributor

Use LoadLibraryExA instead of LoadLibraryA to mitigate a possible DLL injection issue when we load the Level zero DLL on windows.

#elif defined(_WIN32) || defined(_WIN64)
_handle = LoadLibraryA(libName);
_handle =
LoadLibraryExA(libName, nullptr, LOAD_LIBRARY_SEARCH_SYSTEM32);
Copy link
Copy Markdown
Contributor

@oleksandr-pavlyk oleksandr-pavlyk Oct 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should Windows include "libloaderapi.h" instead of "windows.h" ?

https://docs.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloaderapi-loadlibraryexa

@coveralls
Copy link
Copy Markdown
Collaborator

coveralls commented Oct 25, 2021

Coverage Status

Coverage remained the same at 74.511% when pulling d43b799 on diptorupd:fix/dll_load into da13887 on IntelPython:master.

@oleksandr-pavlyk
Copy link
Copy Markdown
Contributor

Can you rebase your changes on top of the current master, rather than release/0.10 ?

@diptorupd diptorupd force-pushed the fix/dll_load branch 2 times, most recently from 53f0042 to f9e2935 Compare October 25, 2021 21:04
Copy link
Copy Markdown
Contributor

@oleksandr-pavlyk oleksandr-pavlyk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#638 runs the workflows and windows passes.

@diptorupd
Copy link
Copy Markdown
Contributor Author

Merging after testing locally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants