Skip to content

[SYCL][UR][L0 v2] Fix uninitialized variable use #19032

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

Closed
wants to merge 1 commit into from

Conversation

igchor
Copy link
Member

@igchor igchor commented Jun 17, 2025

isInOrder is initialized after eventPool

@igchor igchor requested a review from a team as a code owner June 17, 2025 20:58
@igchor igchor requested a review from EwanC June 17, 2025 20:58
@igchor igchor temporarily deployed to WindowsCILock June 17, 2025 20:59 — with GitHub Actions Inactive
@igchor igchor temporarily deployed to WindowsCILock June 17, 2025 21:32 — with GitHub Actions Inactive
@igchor igchor temporarily deployed to WindowsCILock June 17, 2025 21:32 — with GitHub Actions Inactive
isInOrder is initialized after eventPool
@@ -67,8 +67,9 @@ ur_exp_command_buffer_handle_t_::ur_exp_command_buffer_handle_t_(
v2::raii::command_list_unique_handle &&commandList,
const ur_exp_command_buffer_desc_t *desc)
: eventPool(context->getEventPoolCache(PoolCacheType::Regular)
.borrow(device->Id.value(),
isInOrder ? v2::EVENT_FLAGS_COUNTER : 0)),
.borrow(device->Id.value(), (desc && desc->isInOrder)
Copy link
Contributor

@EwanC EwanC Jun 18, 2025

Choose a reason for hiding this comment

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

Shouldn't need desc &&. Desc shouldn't be a nullptr according to https://oneapi-src.github.io/unified-runtime/core/api.html#urcommandbuffercreateexp which we rely on the validation layer to catch. If you look on line 247 you can see an example of dereferencing it without the nullptr check.

Also for lines 74 & 75

@igchor
Copy link
Member Author

igchor commented Jun 18, 2025

This was based on changes reverted in #18962 I will create a new patch with all the fixes included

@igchor igchor closed this Jun 18, 2025
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