Constrain the layout of Blake2bCtx for proper SPARC compilation

On SPARC, optimization fuel ends up emitting incorrect load and store
instructions for the transmute() call in blake2b_compress().  If we
force Blake2bCtx to be repr(C), the problem disappears.

Fixes #43346
This commit is contained in:
Danek Duvall 2017-07-25 14:32:08 -07:00
parent c417ee9ae8
commit f0fda53cc1

View File

@ -23,6 +23,7 @@
use std::mem;
use std::slice;
#[repr(C)]
pub struct Blake2bCtx {
b: [u8; 128],
h: [u64; 8],