Commit 26c11d6
authored
Rollup merge of rust-lang#155361 - Darksonn:abi-cfi, r=RalfJung
Document that CFI diverges from Rust wrt. ABI-compatibility rules
The CFI sanitizer is a sanitizer that checks that no ABI-incompatible function calls are made at runtime, but there is currently an unfortunate divergence between the Rust ABI-compatibility rules and what the CFI sanitizer checks. Thus, document that this divergence exists.
There are proposals for how we can align the ABI rules to eliminate this discrepancy, and I would like to follow through with those, but for now I think we can at least document that the discrepancy exists.
For further discussion please see [Re-evaluate ABI compatibility rules in light of CFI](rust-lang/unsafe-code-guidelines#489) and [Can CFI be made compatible with type erasure schemes?](rust-lang#128728) and [`fn_cast!` macro](rust-lang#140803).
cc @rcvalle @samitolvanen @maurer @bjorn3 @RalfJung
Rendered:
<img width="956" height="391" alt="image" src="https://github.com/user-attachments/assets/410d3eaa-9476-4800-9ef8-bbb100a100c5" />2 files changed
Lines changed: 35 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1794 | 1794 | | |
1795 | 1795 | | |
1796 | 1796 | | |
| 1797 | + | |
1797 | 1798 | | |
1798 | 1799 | | |
1799 | 1800 | | |
| |||
1831 | 1832 | | |
1832 | 1833 | | |
1833 | 1834 | | |
1834 | | - | |
| 1835 | + | |
1835 | 1836 | | |
1836 | 1837 | | |
1837 | 1838 | | |
| |||
1890 | 1891 | | |
1891 | 1892 | | |
1892 | 1893 | | |
| 1894 | + | |
| 1895 | + | |
1893 | 1896 | | |
1894 | 1897 | | |
1895 | 1898 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
246 | 246 | | |
247 | 247 | | |
248 | 248 | | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
249 | 280 | | |
250 | 281 | | |
251 | 282 | | |
| |||
0 commit comments