Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash in urAdapterGet with non-initialized platforms #1183

Merged
merged 1 commit into from
Apr 22, 2024

Conversation

al42and
Copy link
Contributor

@al42and al42and commented Dec 13, 2023

Encountered in a bothched ASAN build, but makes sense to check platform status before trying to query it.

@al42and al42and requested a review from a team as a code owner December 13, 2023 00:25
Copy link
Contributor

@pbalcer pbalcer left a comment

Choose a reason for hiding this comment

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

I don't think the fix is this simple. If there's only one adapter, we might never get into the loader's urAdapterGet implementation. But this is a step in the right direction.

Eventually, we might want to rewrite the way adapters are initialized, so that it's possible to just not have the broken adapters in the platforms collection.

source/loader/ur_ldrddi.cpp Show resolved Hide resolved
@kbenzie kbenzie added loader Loader related feature/bug ready to merge Added to PR's which are ready to merge labels Apr 10, 2024
Encountered in a bothched ASAN build, but makes sense to check platform
status before trying to query it.
@kbenzie kbenzie merged commit 2eea85f into oneapi-src:main Apr 22, 2024
51 checks passed
@al42and al42and deleted the fix-uninit-platforms branch April 22, 2024 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
loader Loader related feature/bug ready to merge Added to PR's which are ready to merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants