diff options
| author | Danek Duvall <danek.duvall@oracle.com> | 2017-07-25 14:32:08 -0700 |
|---|---|---|
| committer | Danek Duvall <danek.duvall@oracle.com> | 2017-07-25 14:32:08 -0700 |
| commit | f0fda53cc107ccb581a2493e9f02200413e6055d (patch) | |
| tree | bf9ba28997d16d5ce1e570673a4313fe83fd8c9b /src/librustc_data_structures | |
| parent | c417ee9ae8c30ac307c58591da46cf62e91caac1 (diff) | |
| download | rust-f0fda53cc107ccb581a2493e9f02200413e6055d.tar.gz rust-f0fda53cc107ccb581a2493e9f02200413e6055d.zip | |
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
Diffstat (limited to 'src/librustc_data_structures')
| -rw-r--r-- | src/librustc_data_structures/blake2b.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/librustc_data_structures/blake2b.rs b/src/librustc_data_structures/blake2b.rs index bdef9fefd41..5adeef1ab3a 100644 --- a/src/librustc_data_structures/blake2b.rs +++ b/src/librustc_data_structures/blake2b.rs @@ -23,6 +23,7 @@ use std::mem; use std::slice; +#[repr(C)] pub struct Blake2bCtx { b: [u8; 128], h: [u64; 8], |
