Commit da17c26
committed
fix handling of large indices in SmallProjectionPath
* Fix the right shift operator which didn't work if the number of bits is exactly 64
* Detect overflow when combining indices
Such large indices usually don't appear in real code, except in internal String operations where (potentially large) integer values are treated as pointers.
Fixes a compiler crash
#84372
rdar://1608631991 parent 963aad3 commit da17c26
File tree
1 file changed
+22
-3
lines changed- SwiftCompilerSources/Sources/SIL/Utilities
1 file changed
+22
-3
lines changedLines changed: 22 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
| 193 | + | |
194 | 194 | | |
195 | 195 | | |
196 | 196 | | |
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
| 217 | + | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| |||
691 | 691 | | |
692 | 692 | | |
693 | 693 | | |
694 | | - | |
| 694 | + | |
| 695 | + | |
695 | 696 | | |
696 | 697 | | |
697 | 698 | | |
| |||
964 | 965 | | |
965 | 966 | | |
966 | 967 | | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
| 973 | + | |
| 974 | + | |
| 975 | + | |
| 976 | + | |
| 977 | + | |
| 978 | + | |
| 979 | + | |
| 980 | + | |
| 981 | + | |
| 982 | + | |
| 983 | + | |
| 984 | + | |
| 985 | + | |
967 | 986 | | |
968 | 987 | | |
0 commit comments