Skip to content

[SYCL][NFC] Add initializers to local variables #7350

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

@AlexeySachkov AlexeySachkov commented Nov 10, 2022

This patch aims to improve situation with unit-tests: a lot of PI routines only have dummy mock versions of them. Dummy mocks ignore all arguments, leaving out-parameters untouched. Depending on how they used at call site, this could lead to some obscure errors like bad_alloc if an uninitialized value was used to set a size of a vector.

Discovered while working on a unit-test in #7333

This patch aims to improve situation with unit-tests: a lot of PI
routines only hace dummy mock versions of them. Dummy mocks ignore all
arguments, leaving out-parameters untoched. Depending on how they used
at call site, this could lead to some obscure errors like `bad_alloc` if
an uninitialized value was used to set a size of a `vector`.

Discovered while working on a unit-test in intel#7333
@AlexeySachkov AlexeySachkov requested a review from a team November 10, 2022 10:49
@AlexeySachkov AlexeySachkov requested a review from a team as a code owner November 10, 2022 10:49
@AlexeySachkov
Copy link
Contributor Author

Failed device_num is a known issue which was fixed in #7336

@AlexeySachkov AlexeySachkov merged commit 297e54d into intel:sycl Nov 15, 2022
@AlexeySachkov AlexeySachkov deleted the private/asachkov/initialize-local-variables branch May 22, 2024 09:51
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.

3 participants