Skip to content

Commit f0fda53

Browse files
author
Danek Duvall
committed
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
1 parent c417ee9 commit f0fda53

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/librustc_data_structures/blake2b.rs

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
use std::mem;
2424
use std::slice;
2525

26+
#[repr(C)]
2627
pub struct Blake2bCtx {
2728
b: [u8; 128],
2829
h: [u64; 8],

0 commit comments

Comments
 (0)