Commit 006c896
authored
[SYCL] Fix checkValueRange (#18439)
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>1 parent 8d8f695 commit 006c896
1 file changed
Lines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
55 | | - | |
| 54 | + | |
56 | 55 | | |
57 | 56 | | |
58 | 57 | | |
| |||
66 | 65 | | |
67 | 66 | | |
68 | 67 | | |
69 | | - | |
70 | | - | |
71 | | - | |
| 68 | + | |
| 69 | + | |
72 | 70 | | |
73 | 71 | | |
74 | 72 | | |
| |||
0 commit comments