about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-01-04 14:26:17 +0000
committerbors <bors@rust-lang.org>2017-01-04 14:26:17 +0000
commitd40d01bd0e7d9d20bb3454a3d0870f00b805a01c (patch)
tree66825cd9e643945960b1755bb058bfce314bb8dd /src/rustllvm/RustWrapper.cpp
parent9c0e373f914bba7adc85d8d2b6b7a561b6102937 (diff)
parent71a11a0b102b0ba92895cdc4cff4ac7e78d9a12c (diff)
downloadrust-d40d01bd0e7d9d20bb3454a3d0870f00b805a01c.tar.gz
rust-d40d01bd0e7d9d20bb3454a3d0870f00b805a01c.zip
Auto merge of #38670 - dotdash:transmute_align, r=eddyb
Fix transmute::<T, U> where T requires a bigger alignment than U

For transmute::<T, U> we simply pointercast the destination from a U
pointer to a T pointer, without providing any alignment information,
thus LLVM assumes that the destination is aligned to hold a value of
type T, which is not necessarily true. This can lead to LLVM emitting
machine instructions that assume said alignment, and thus cause aborts.

To fix this, we need to provide the actual alignment to store_operand()
and in turn to store() so they can set the proper alignment information
on the stores and LLVM can emit the proper machine instructions.

Fixes #32947
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions