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
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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

? v2::EVENT_FLAGS_COUNTER
: 0)),
context(context), device(device),
isUpdatable(desc ? desc->isUpdatable : false),
isInOrder(desc ? desc->isInOrder : false),
Expand Down
Loading