diff options
| author | Björn Steinbrink <bsteinbr@gmail.com> | 2016-12-29 02:20:26 +0100 |
|---|---|---|
| committer | Björn Steinbrink <bsteinbr@gmail.com> | 2016-12-31 13:13:30 +0100 |
| commit | 71a11a0b102b0ba92895cdc4cff4ac7e78d9a12c (patch) | |
| tree | f970a3405d5ebea04f7a343e5b93a43abbf1dbe0 /src/rustllvm/RustWrapper.cpp | |
| parent | 82801b552ee8a683c40eb9fce5b892e649794648 (diff) | |
| download | rust-71a11a0b102b0ba92895cdc4cff4ac7e78d9a12c.tar.gz rust-71a11a0b102b0ba92895cdc4cff4ac7e78d9a12c.zip | |
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
