bors
0c2c243342
Auto merge of #112599 - saethlin:cleaner-panics, r=thomcc
...
Launch a non-unwinding panic for misaligned pointer deref
This panic already never unwinds, but that's only because it always hits the unwind guard that's created by our `UnwindAction::Terminate`. Hitting the unwind guard generates a huge double-panic backtrace. Now we generate a normal-looking panic message when this check is hit.
r? `@thomcc`
2023-06-18 01:58:51 +00:00
Wesley Wiser
4ef316f397
Update compiler/rustc_mir_transform/src/check_alignment.rs
2023-06-16 09:55:23 -04:00
Ben Kimock
7a2490eba3
Launch a non-unwinding panic for misaligned pointer deref
2023-06-16 09:20:33 -04:00
Ben Kimock
c54672e25f
Disable alignment checks on i686-pc-windows-msvc
2023-06-16 09:06:12 -04:00
Gary Guo
d9531a0d93
Remove wrongly emitted .eh_frame
in -Cpanic=abort
2023-06-07 21:03:51 +01:00
Ben Kimock
783b1ce99c
Exclude Rvalue::AddressOf for raw pointer deref alignment checks
2023-05-27 14:54:15 -04:00
Ben Kimock
f08f903fa9
Box AssertKind
2023-05-01 23:12:41 -04:00
Maybe Waffle
e496fbec92
Split {Idx, IndexVec, IndexSlice}
into their own modules
2023-04-24 13:53:35 +00:00
Ben Kimock
4061eb5897
Only emit alignment checks if we have a panic_impl
2023-04-13 10:58:00 -04:00
Gary Guo
bf6b84b10a
Fix new usage of old api
2023-04-06 09:34:16 +01:00
Scott McMurray
a2ee7592d6
Use &IndexSlice
instead of &IndexVec
where possible
...
All the same reasons as for `[T]`: more general, less pointer chasing, and `&mut IndexSlice` emphasizes that it doesn't change *length*.
2023-04-02 17:35:37 -07:00
Ben Kimock
67540ec950
Skip checks for common types with alignment 1
2023-03-24 12:35:16 -04:00
Ben Kimock
a71b808d77
Use Vec::split_off
2023-03-24 12:34:49 -04:00
Ben Kimock
c9c1346874
Clarify that we are doing ptr.addr() internally
...
Co-authored-by: Ralf Jung <post@ralfj.de>
2023-03-24 10:48:40 -04:00
Ben Kimock
8ccf53332e
A MIR transform that checks pointers are aligned
2023-03-23 18:23:06 -04:00