Skip to content

Conversation

@cperkinsintel
Copy link
Contributor

Fix for various problems in Windows shutdown. See the sycl/doc/design/GlobalObjectsInRuntime.md for the technical discussion. This was broken out from #16618 to be its own pull request.

Copy link
Contributor

@KseniyaTikhomirova KseniyaTikhomirova left a comment

Choose a reason for hiding this comment

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

LGTM

if (GetModuleFileNameA(hModule, dllPath, MAX_PATH)) {
char exePath[MAX_PATH];
if (GetModuleFileNameA(NULL, exePath, MAX_PATH)) {
if (std::string(dllPath) == std::string(exePath)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

std::string constructor copies char arrays, strcmp would be better.

// If loader is already closed, it'll return a not-initialized status
// which the UR should convert to SUCCESS code. But that isn't always
// working on Windows. This is a temporary workaround until that is fixed.
// TODO: Remove this workaround when UR is fixed, and restore
Copy link
Contributor

Choose a reason for hiding this comment

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

could we please create a JIRA task for this todo (blocked by UR issue)?
we have a lot of TODOs in code not tracked and forgotten.

@cperkinsintel cperkinsintel deleted the cperkins-windows-shutdown-fix branch April 25, 2025 21:13
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.

2 participants