Commit da1c320
authored
[SYCL] fix for std::locale::global interfering with allowlist check (#18550)
`std::locale::global()` is a very common way for apps to initialize
string localization for numeric and monetary values. Unfortunately, it
is global.
In this very limited fix, we are preventing it from interfering with the
allowlist check which uses `std::stringstream`. The insertion of commas
into numbers for the locale support messes with the expected values.
We'll probably have to audit the other uses of std streams to see if
they would be similarly vulnerable.
---------
Signed-off-by: Chris Perkins <[email protected]>1 parent 97fed15 commit da1c320
File tree
2 files changed
+36
-0
lines changed- sycl
- source/detail
- unittests/allowlist
2 files changed
+36
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
| 431 | + | |
| 432 | + | |
431 | 433 | | |
432 | 434 | | |
433 | 435 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
13 | 18 | | |
14 | 19 | | |
15 | 20 | | |
| |||
85 | 90 | | |
86 | 91 | | |
87 | 92 | | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
88 | 122 | | |
89 | 123 | | |
90 | 124 | | |
| |||
0 commit comments