-
Notifications
You must be signed in to change notification settings - Fork 30
Addressed "Very high" Coverity issue: dereferencing null pointer #1369
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
Addressed "Very high" Coverity issue: dereferencing null pointer #1369
Conversation
Ensured that `create_property_list` always returns an not-null unique pointer by creating an default-constructed property_list for the fall-through. With this change we no longer need to branches for call to sycl::queue constructor, since propList is always available.
View rendered docs @ https://intelpython.github.io/dpctl/pulls/1369/index.html |
Array API standard conformance tests for dpctl=0.14.6dev4=py310ha25a700_15 ran successfully. |
@@ -143,6 +143,9 @@ std::unique_ptr<property_list> create_property_list(int properties) | |||
propList = | |||
std::make_unique<property_list>(sycl::property::queue::in_order()); | |||
} | |||
else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was not aware SYCL runtime allows an empty property_list. The change is good.
Remove unneeded static keyword in definition of create_property_list function in anonymous namespace
Array API standard conformance tests for dpctl=0.14.6dev4=py310ha25a700_29 ran successfully. |
Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞 |
Array API standard conformance tests for dpctl=0.14.6dev4=py310ha25a700_29 ran successfully. |
Ensured that
create_property_list
always returns an not-null unique pointer by creating an default-constructedproperty_list
for the fall-through.With this change we no longer need two branches for call to
sycl::queue
constructor, sincepropList
is always available.