Skip to content

[SYCL][NFCI] Address static analyzer concerns #16296

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

Conversation

AlexeySachkov
Copy link
Contributor

Two changes were made:

Special padding field in accessors is now zero-initialized. We construct a host_accessor object in our stream implementation and static analyzer complained that some of the accessor's fields were uninitialized. It is not like we even reference padding field from anywhere, but the code change seems small, so I decided to add the initializer.

Fixed a condition to prevent access to an array of N elements at index N, which is outside of the array because they are 0-indexed.

Copy link
Contributor

@maarquitos14 maarquitos14 left a comment

Choose a reason for hiding this comment

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

Just a nit.

Co-authored-by: Marcos Maronas <marcos.maronas@intel.com>
@AlexeySachkov AlexeySachkov merged commit 4e13d23 into intel:sycl Dec 9, 2024
14 checks passed
@AlexeySachkov AlexeySachkov deleted the private/asachkov/address-static-analyzer-concerns branch April 30, 2025 16:41
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