22a7a19f93
Insert alignment checks for pointer dereferences when debug assertions are enabled Closes https://github.com/rust-lang/rust/issues/54915 - [x] Jake tells me this sounds like a place to use `MirPatch`, but I can't figure out how to insert a new basic block with a new terminator in the middle of an existing basic block, using `MirPatch`. (if nobody else backs up this point I'm checking this as "not actually a good idea" because the code looks pretty clean to me after rearranging it a bit) - [x] Using `CastKind::PointerExposeAddress` is definitely wrong, we don't want to expose. Calling a function to get the pointer address seems quite excessive. ~I'll see if I can add a new `CastKind`.~ `CastKind::Transmute` to the rescue! - [x] Implement a more helpful panic message like slice bounds checking. r? `@oli-obk` |
||
---|---|---|
.. | ||
asm | ||
auxiliary | ||
nvptx-kernel-abi | ||
stack-protector | ||
aarch64-naked-fn-no-bti-prolog.rs | ||
aarch64-pointer-auth.rs | ||
align_offset.rs | ||
dwarf5.rs | ||
is_aligned.rs | ||
niche-prefer-zero.rs | ||
nvptx-arch-default.rs | ||
nvptx-arch-emit-asm.rs | ||
nvptx-arch-link-arg.rs | ||
nvptx-arch-target-cpu.rs | ||
nvptx-atomics.rs | ||
nvptx-internalizing.rs | ||
nvptx-linking-binary.rs | ||
nvptx-linking-cdylib.rs | ||
nvptx-safe-naming.rs | ||
panic-no-unwind-no-uwtable.rs | ||
panic-unwind-no-uwtable.rs | ||
pic-relocation-model.rs | ||
pie-relocation-model.rs | ||
sparc-struct-abi.rs | ||
static-relocation-model.rs | ||
strict_provenance.rs | ||
target-feature-multiple.rs | ||
x86_64-floating-point-clamp.rs | ||
x86_64-fortanix-unknown-sgx-lvi-generic-load.rs | ||
x86_64-fortanix-unknown-sgx-lvi-generic-ret.rs | ||
x86_64-fortanix-unknown-sgx-lvi-inline-assembly.rs | ||
x86_64-naked-fn-no-cet-prolog.rs | ||
x86_64-no-jump-tables.rs | ||
x86_64-sse_crc.rs | ||
x86-stack-probes.rs |