diff options
| author | Mark Simulacrum <mark.simulacrum@gmail.com> | 2017-07-26 06:15:09 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-07-26 06:15:09 -0600 |
| commit | 959ebd6785b48360ac48e334a18b3abe66beef17 (patch) | |
| tree | 3161b24a486580b7e6c917d0482df2547c030382 | |
| parent | ed09d6dfe1b5fa5f8331a4b8ab31e37755803924 (diff) | |
| parent | f0fda53cc107ccb581a2493e9f02200413e6055d (diff) | |
| download | rust-959ebd6785b48360ac48e334a18b3abe66beef17.tar.gz rust-959ebd6785b48360ac48e334a18b3abe66beef17.zip | |
Rollup merge of #43480 - dhduvall:sparc-blake2b, r=eddyb
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
| -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], |
