• B
    Fix transmute::<T, U> where T requires a bigger alignment than U · 71a11a0b
    Björn Steinbrink 提交于
    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
    71a11a0b
mod.rs 22.8 KB