Skip to content

[SYCL] Fix checkValueRange #18439

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
May 13, 2025
Merged

[SYCL] Fix checkValueRange #18439

merged 1 commit into from
May 13, 2025

Conversation

Pennycook
Copy link
Contributor

The code previously cast to unsigned, assuming that checking the lower 32 bits would be sufficient for the overflow calculation.

This is not true, because casting a size_t to unsigned could result in a very small number, e.g. std::numeric_limits<unsigned>::max() + 1 casts to 0.

The code previously cast to unsigned, assuming that checking the lower 32
bits would be sufficient for the overflow calculation.

This is not true, because casting a size_t to unsigned could result in a very
small number, e.g. "std::numeric_limits<unsigned>::max() + 1" casts to 0.

Signed-off-by: John Pennycook <john.pennycook@intel.com>
@Pennycook Pennycook requested a review from a team as a code owner May 13, 2025 12:10
@Pennycook Pennycook requested a review from aelovikov-intel May 13, 2025 12:10
@Pennycook
Copy link
Contributor Author

Failing tests are in #18416.

@Pennycook
Copy link
Contributor Author

@intel/llvm-gatekeepers - This can be merged. See above comment regarding failed Arc tests.

@ldrumm ldrumm merged commit 006c896 into intel:sycl May 13, 2025
23 of 24 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants