Commit 8ed31d2
authored
Rollup merge of #78602 - RalfJung:raw-ptr-aliasing-issues, r=m-ou-se
fix various aliasing issues in the standard library
This fixes various cases where the standard library either used raw pointers after they were already invalidated by using the original reference again, or created raw pointers for one element of a slice and used it to access neighboring elements.File tree
5 files changed
+17
-9
lines changed- library
- alloc/src/collections
- core/src
- fmt
- hash
- mem
- std/src/sys/unix
5 files changed
+17
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1036 | 1036 | | |
1037 | 1037 | | |
1038 | 1038 | | |
1039 | | - | |
1040 | | - | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
1041 | 1042 | | |
1042 | 1043 | | |
1043 | 1044 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
595 | 595 | | |
596 | 596 | | |
597 | 597 | | |
598 | | - | |
599 | 598 | | |
600 | 599 | | |
601 | 600 | | |
| |||
606 | 605 | | |
607 | 606 | | |
608 | 607 | | |
609 | | - | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
610 | 613 | | |
611 | 614 | | |
612 | 615 | | |
| |||
615 | 618 | | |
616 | 619 | | |
617 | 620 | | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
618 | 624 | | |
619 | 625 | | |
620 | 626 | | |
| |||
629 | 635 | | |
630 | 636 | | |
631 | 637 | | |
632 | | - | |
| 638 | + | |
633 | 639 | | |
634 | 640 | | |
635 | 641 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
842 | 842 | | |
843 | 843 | | |
844 | 844 | | |
845 | | - | |
| 845 | + | |
846 | 846 | | |
847 | 847 | | |
848 | 848 | | |
849 | 849 | | |
850 | 850 | | |
851 | 851 | | |
852 | | - | |
| 852 | + | |
853 | 853 | | |
854 | 854 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
178 | 178 | | |
179 | 179 | | |
180 | 180 | | |
181 | | - | |
| 181 | + | |
| 182 | + | |
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
| |||
0 commit comments