diff options
| author | Mazdak Farrokhzad <twingoow@gmail.com> | 2019-01-12 10:55:20 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-01-12 10:55:20 +0100 |
| commit | bcbf73f9c15ec46c5b7596cd62b8a6f170196409 (patch) | |
| tree | da185da114d4d97ac00d6dc1d4f2e773cd43edc7 /src/libstd/sys | |
| parent | 1f66062b9279d9da4732696e26829fef5e4b9265 (diff) | |
| parent | 928efca151b0afcff90771ef94e09f7634646082 (diff) | |
| download | rust-bcbf73f9c15ec46c5b7596cd62b8a6f170196409.tar.gz rust-bcbf73f9c15ec46c5b7596cd62b8a6f170196409.zip | |
Rollup merge of #57511 - jethrogb:jb/fix-undef, r=cramertj
Fix undefined behavior From the [`MaybeUninit::get_mut` docs](https://doc.rust-lang.org/std/mem/union.MaybeUninit.html): > It is up to the caller to guarantee that the the MaybeUninit really is in an initialized state, otherwise this will immediately cause undefined behavior. r? @joshtriplett
Diffstat (limited to 'src/libstd/sys')
| -rw-r--r-- | src/libstd/sys/sgx/ext/arch.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sys/sgx/ext/arch.rs b/src/libstd/sys/sgx/ext/arch.rs index ba6f9e622ad..3bd87b5d265 100644 --- a/src/libstd/sys/sgx/ext/arch.rs +++ b/src/libstd/sys/sgx/ext/arch.rs @@ -36,7 +36,7 @@ pub fn egetkey(request: &Align512<[u8; 512]>) -> Result<Align16<[u8; 16]>, u32> : "={eax}"(error) : "{eax}"(ENCLU_EGETKEY), "{rbx}"(request), - "{rcx}"(out.get_mut()) + "{rcx}"(out.as_mut_ptr()) : "flags" ); @@ -66,7 +66,7 @@ pub fn ereport( : "{eax}"(ENCLU_EREPORT), "{rbx}"(targetinfo), "{rcx}"(reportdata), - "{rdx}"(report.get_mut()) + "{rdx}"(report.as_mut_ptr()) ); report.into_inner() |
