Auto merge of #1905 - camelid:rustup, r=RalfJung

rustup

r? `@RalfJung`
This commit is contained in:
bors 2021-11-02 01:44:48 +00:00
commit 3f2c9ee17e
4 changed files with 4 additions and 4 deletions

View File

@ -1 +1 @@
c7a30c8b6860d1f3459086f7a91074db1b54bc37
db062de72b0a064f45b6f86894cbdc7c0ec68844

View File

@ -5,6 +5,6 @@ use std::alloc::{alloc, realloc, Layout};
fn main() {
unsafe {
let x = alloc(Layout::from_size_align_unchecked(1, 1));
realloc(x, Layout::from_size_align_unchecked(2, 1), 1);
let _y = realloc(x, Layout::from_size_align_unchecked(2, 1), 1);
}
}

View File

@ -3,7 +3,7 @@ use std::alloc::{alloc, realloc, Layout};
fn main() {
unsafe {
let x = alloc(Layout::from_size_align_unchecked(1, 1));
realloc(x, Layout::from_size_align_unchecked(1, 1), 1);
let _y = realloc(x, Layout::from_size_align_unchecked(1, 1), 1);
let _z = *x; //~ ERROR dereferenced after this allocation got freed
}
}

View File

@ -6,6 +6,6 @@ fn main() {
unsafe {
let x = alloc(Layout::from_size_align_unchecked(1, 1));
dealloc(x, Layout::from_size_align_unchecked(1, 1));
realloc(x, Layout::from_size_align_unchecked(1, 1), 1);
let _z = realloc(x, Layout::from_size_align_unchecked(1, 1), 1);
}
}