forked from rust-lang/rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit 58dcd1f
Auto merge of rust-lang#123071 - rcvalle:rust-cfi-fix-method-fn-ptr-cast, r=compiler-errors
CFI: Fix methods as function pointer cast
Fix casting between methods and function pointers by assigning a secondary type id to methods with their concrete self so they can be used as function pointers.
This was split off from rust-lang#116404.
cc `@compiler-errors` `@workingjubilee`File tree
5 files changed
+84
-27
lines changed- compiler
- rustc_codegen_llvm/src
- rustc_symbol_mangling/src
- typeid
- tests
- codegen/sanitizer/cfi
- ui/sanitizer
5 files changed
+84
-27
lines changedOriginal file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
21 | + | ||
21 | 22 |
| |
23 | + | ||
22 | 24 |
| |
23 | 25 |
| |
24 | 26 |
| |
| |||
141 | 143 |
| |
142 | 144 |
| |
143 | 145 |
| |
144 | - | ||
145 | - | ||
146 | - | ||
147 | - | ||
148 | - | ||
149 | - | ||
150 | - | ||
151 | - | ||
152 | - | ||
153 | - | ||
154 | - | ||
155 | - | ||
156 | - | ||
157 | - | ||
146 | + | ||
147 | + | ||
148 | + | ||
149 | + | ||
150 | + | ||
151 | + | ||
152 | + | ||
153 | + | ||
154 | + | ||
155 | + | ||
156 | + | ||
157 | + | ||
158 | + | ||
159 | + | ||
160 | + | ||
158 | 161 |
| |
159 | - | ||
160 | - | ||
161 | - | ||
162 | - | ||
163 | - | ||
164 | - | ||
165 | - | ||
166 | - | ||
167 | - | ||
168 | - | ||
169 | - | ||
170 | - | ||
162 | + | ||
163 | + | ||
164 | + | ||
165 | + | ||
166 | + | ||
167 | + | ||
168 | + | ||
169 | + | ||
170 | + | ||
171 | 171 |
| |
172 | 172 |
| |
173 | 173 |
| |
|
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
13 | 13 |
| |
14 | 14 |
| |
15 | 15 |
| |
16 | + | ||
17 | + | ||
18 | + | ||
16 | 19 |
| |
20 | + | ||
21 | + | ||
17 | 22 |
| |
23 | + | ||
24 | + | ||
25 | + | ||
18 | 26 |
| |
27 | + | ||
28 | + | ||
29 | + | ||
19 | 30 |
| |
20 | 31 |
| |
21 | 32 |
| |
|
Lines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1144 | 1144 |
| |
1145 | 1145 |
| |
1146 | 1146 |
| |
1147 | - | ||
1147 | + | ||
1148 | + | ||
1148 | 1149 |
| |
1149 | 1150 |
| |
1150 | 1151 |
| |
|
Lines changed: 22 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | + | ||
2 | + | ||
3 | + | ||
4 | + | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | ||
19 | + | ||
20 | + | ||
21 | + | ||
22 | + |
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1 | + | ||
2 | + | ||
3 | + | ||
4 | + | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | + | ||
9 | + | ||
10 | + | ||
11 | + | ||
12 | + | ||
13 | + | ||
14 | + | ||
15 | + | ||
16 | + | ||
17 | + | ||
18 | + | ||
19 | + | ||
20 | + | ||
21 | + | ||
22 | + | ||
23 | + |
0 commit comments